On 22 Jan 2005 02:58:44 -0800,
ro*****@gmail.com (Rob) wrote:
I am having trouble with this. I would like to combine a html form
and the php processing into one file and insert the info into mysql.
So a basic form which gets processed in the same script which also
inserts inot mysql whats the general syntax for that. does the php go
at the top or vise versa
Well, there's many ways of doing it, but a simple idiom would be something
like:
if data received from form then
validate data
if data validated then
update database
if database update successful
display success page or redirect elsewhere
end script
end if
end if
end if
if validation or database update failed
display form with data plus any validation errors
else
display blank form
end if
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool