Results 11 to 15 of 15
-
5th May 2011, 09:00 PM #11
-
5th May 2011, 09:05 PM #12MemberWebsite's:
EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.comTry:
PHP Code:if(isset($_GET['id']) && is_numeric($_GET['id']) && strlen($_GET['id'] < 7)) {
EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
ImgWiz - (Free Image Hosting)
-
6th May 2011, 04:37 AM #13OPMember
Hello,
Thanks for your help,
I also wanted to clarify, that i have two id fields on the table.
1 is "id" which is the id for a user who posts to the database
2 is "iid" which is the id for the post
I am now using this code:
<?php
include 'dbc.php';
?>
<?php
// First check if we have a id of a download to show in detail
if(isset($_GET['iid']) && is_numeric($_GET['iid']) && strlen($_GET['iid'] < 7)) {
$sql = mysql_query("SELECT id, title,description,download,date FROM index WHERE iid=".$_GET['iid']);
// output your detailed info here. Smart to check if it exists first. Throw a message if it doesn't exist and if it does show the download.
}
// if no download number then we'll just show the list as normal
else
{
$sql = mysql_query("SELECT id, title FROM index LIMIT 30");
while($row = mysql_fetch_assoc($sql))
{
echo '<tr><td>'.$row['id'].'</td><td><a href="index.php?id='.$row['id'].'">'.$row['title'].'</a></td><td>'.$row['description'].'</td><td>'.$row['download'].'</td></tr>';
}
}
?>
After i execute it i get this:
Just a blank screen:
-
6th May 2011, 04:43 AM #14MemberWebsite's:
LulzCovers.com LulzTroll.comusing <tr><td> without table defined :/
add
Code:echo '<table><tbody>';
and
Code:echo '</tbody></table>';
and then give it a try.Contact me for Traffic, SEO, WCDDL, Wordpress, IPB related Services or queries.
Template Designing, PSD to HTML, Wordpress
-
6th May 2011, 04:53 AM #15OPMember
Ok well things work well now, but another small issue i have a doubt on this code somehow:
lol just edited this post like 5 times now:
Nevermind it works
THanks guys will see if i get any other error will post it up.
Cheerz
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Creating tables in RVSiteBuilder
By Areon in forum Server ManagementReplies: 0Last Post: 3rd Mar 2014, 03:15 PM -
How Should I Organize My SQL Tables?
By Robin Hood in forum Web Development AreaReplies: 7Last Post: 22nd Aug 2012, 03:54 PM -
Exporting tables from one to another [help req]
By xtone in forum Web Development AreaReplies: 6Last Post: 27th Sep 2011, 11:05 PM -
help me mysql tables are corupted
By awaisdik2003 in forum vBulletinReplies: 0Last Post: 21st Sep 2010, 12:38 PM -
IP tables warning..how to fix it
By lucy fox in forum Server ManagementReplies: 2Last Post: 22nd Apr 2010, 11:04 AM
themaRegister - register to forums...
Version 3.51 released. Open older version (or...