Page 1 of 1
First script is done, yay!
Posted: Fri Jun 21, 2002 10:21 pm
by ibelimb
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
Posted: Fri Jun 21, 2002 10:56 pm
by protokol
interesting .. after signing your guestbook with only the name and a comment i was redirected to Canon USA
Posted: Fri Jun 21, 2002 11:02 pm
by ibelimb
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!
Posted: Fri Jun 21, 2002 11:06 pm
by protokol
hehe, glad to help out

Posted: Fri Jun 21, 2002 11:24 pm
by hob_goblin
i found a bug....use header() instead of meta tag redirects...because i just posted like 4 blank messages...
also, make the name and email required, so i can't post blank things.
Posted: Fri Jun 21, 2002 11:27 pm
by ibelimb
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
Posted: Sat Jun 22, 2002 1:28 am
by e+
how about testing if there is something in the variable, telling them they need to fill it in and then sending them back.
if (!$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
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 yet

)
Posted: Sat Jun 22, 2002 2:52 am
by epsilon
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
use:
Code: Select all
if ($name == "" || $email == "" || $site == "" || $comments == "")
No blank space between the ""