Irish SEO,  Marketing & Webmaster Discussion

 

php question

This is a discussion on php question within the Coding Help forums, part of the Webmaster Help category; which page are you getting the error? the sql for the details page is not right. should be@ PHP Code: ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 16-03-2008, 06:17 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

which page are you getting the error?
the sql for the details page is not right. should be@
PHP Code:
mysql_connect("localhost""username""password")or die("cannot connect server "); 
mysql_select_db("database")or die("cannot select DB");

$sql = ("SELECT * from events WHERE id='".addslashes($id)."'");
$result mysql_query($sql) or die (mysql_error);
 
//echo results
while ($row mysql_fetch_array($result)){
echo 
$row['date'];
echo 
"<br />";

__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 24-03-2008, 06:21 PM
Frontpage User
 
Join Date: Nov 2007
Posts: 7
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
failsafe will become famous soon enough
Default

If you're saying the link doesn't work you also have a problem in this line
Code:
 echo "<a href='details.php?id=$id'>Click Here For Details</a><br />";
you need to use some concatenation for the variable, like so:
Code:
 echo "<a href='details.php?id=".$id."'>Click Here For Details</a><br />";
I'm teaching myself php at the moment and I find Tizag Tutorials quite useful.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
php, question

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
General Blog questions & BLOG URL SEO question. Help Please? :-) Gman290 Search Engine Optimisation 6 08-11-2008 01:24 AM
php question Keewee6 Coding Help 3 15-03-2008 12:34 AM
Ruby on Rails VS PHP Code Igniter gav240z Coding Help 10 04-02-2008 12:04 AM
php question Keewee6 Coding Help 2 17-08-2007 12:51 PM
HELP :: PHP regular expression question littleBird Coding Help 3 13-03-2007 10:33 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 01:44 PM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0