Hey guys,
Finished my firts script! its a guestbook that uses PHP and MySQL to store/retreive data. check it out here and see if you cna find any bugs.
Thanks,
Limb
First script is done, yay!
Moderator: General Moderators
Ahh yes, forgot to change that on that site's script :X (canon.com was the only place i knew to get the refer script at the moment).. fixed, thanks for finding the first bug! lol
Later,
Limb
EDIT: Man i need to learn to type!
Later,
Limb
EDIT: Man i need to learn to type!
Last edited by ibelimb on Fri Jun 21, 2002 11:09 pm, edited 2 times in total.
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
how do i use header()?
and im making it to see if any fields are blank like this:
but it dont work, so what can i do to make it halt if a field is left empty?
Thanks,
Limb
and im making it to see if any fields are blank like this:
Code: Select all
if ($name == " " || $email == " " || $site == " " || $comments == " ")but it dont work, so what can i do to make it halt if a field is left empty?
Thanks,
Limb
how about testing if there is something in the variable, telling them they need to fill it in and then sending them back.
)
Ok I admit that's about the worst bit of code snippet ever but it illustrates the point (it's only 7:30 in the morning here and I haven't had any coffee yetif (!$name)
{
echo 'You have not entered a name, please do so'
// some funky code to either give them the ability to enter the field here or send them back
}
//more of the same
use:ibelimb wrote:how do i use header()?
and im making it to see if any fields are blank like this:
Code: Select all
if ($name == " " || $email == " " || $site == " " || $comments == " ")
but it dont work, so what can i do to make it halt if a field is left empty?
Thanks,
Limb
Code: Select all
if ($name == "" || $email == "" || $site == "" || $comments == "")