PHP MYSQL Exmaples

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
skydodiya
Forum Newbie
Posts: 1
Joined: Thu Jun 19, 2008 1:58 am

PHP MYSQL Exmaples

Post by skydodiya »

hi there,

Please visite the for php mysql examples.
see the php mysql link in page.
calcop
Forum Newbie
Posts: 20
Joined: Fri Mar 04, 2005 2:13 pm

Re: PHP MYSQL Exmaples

Post by calcop »

User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: PHP MYSQL Exmaples

Post by Kieran Huggins »

a good effort, but you have a ton of mistakes. Some examples:

Code: Select all

<td><input name="password" type="text" id="password"></td>
first: should be type="password" - unless you want to show cleartext passwords to the world
second: tables for layout? ugh. In example code?? double ugh.

Code: Select all

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
# could just be 
while($row = mysql_fetch_assoc($result))

Code: Select all

while(list($name,$subject,$message)= mysql_fetch_row($result))
{
echo "Name :$name <br>" .
"Subject : $subject <br>" .
"Message : $row <br><br>";
}
should be

Code: Select all

while(list($name,$subject,$message)= mysql_fetch_row($result))
{
echo "Name :$name <br>" .
"Subject : $subject <br>" .
"Message : $message <br><br>";
}
also, you're not closing your BR tags: <br/>

In general, test your code before publishing it. Especially as a tutorial. Users who don't know better (presumably your core audience) will be confused and go away.

But I want to re-iterate: a good effort, one I hope you continue.
Post Reply