Page 1 of 1

PHP MYSQL Exmaples

Posted: Thu Jun 19, 2008 2:03 am
by skydodiya
hi there,

Please visite the for php mysql examples.
see the php mysql link in page.

Re: PHP MYSQL Exmaples

Posted: Sat Jun 21, 2008 3:42 am
by calcop

Re: PHP MYSQL Exmaples

Posted: Sat Jun 21, 2008 3:52 am
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.