Reply to "update form" from SQL data? probably an easy one!

Your name:

Reply:


Posted by news.tpg.com.au on 05/28/05 07:49

This is probably quite easy but I think I'm getting the syntax wrong
somewhere.

I have a form to update user details and it would be NICE if I could obtain
those user details from the database and place it directly into the form on
the condition that a cookie is set for the user.

Originally I had an HTML form not even considering the possibility. Set up
similar to the below.

<table>
<tr>
<td>Your First Name: </td>
<td><input name="First" type="text" id="First">
example: Joe</td>
</tr>
</table>

So I tried renaming a couple of files, this one to a PHP and tried putting
some PHP in there for the value field of input like so:

<table>
<tr>
<td>Your First Name: </td>
<td><input name="First" type="text" id="First" value="

<?php
if( isset($_COOKIE[User]) ) echo '$_COOKIE[User]';
?>

">
example: Joe</td>
</tr>
</table>

The input box field fills in but with an error rather than the value of the
username.
Any ideas anyone?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация