Page 1 of 1

Need simple html php help

Posted: Fri Oct 11, 2002 11:03 am
by mettlehead
I have a small php script that I call when I press my submit button in my form. My problem is that instead of processing my php script, it asks you if you want to save the script file. any ideas why?


this is my php
<?

//This will tell the user that their information was sent.(the user sees this)
//There is currently no error checking but if needed it can be added.

PRINT "<center><FONT SIZE=-1 face=verdana>"; PRINT "Thank you for
requesting online $name";
PRINT "</center><p><center><TABLE border=0 width=500";
PRINT "cellspacing=0 cellpadding=7>"; PRINT "<TR><TD><FONT SIZE=-1
face=verdana>";
PRINT "We will be contacting you shortly.";
PRINT "Thank you for Visiting BLAXIS online!!!";
PRINT "</FONT></TD></TR></TABLE></center>";

//This is the E-mail which is sent to you. Right now the check boxes just say
//On or Off.

mail("nat_mike@hotmail.com", "HARDWARE Requst-Blaxis", "$name has made a request
\nTheir e-mail is $email
\nEthernet Card $ethernet
\nMemory $ram
\nHard Drive $hd
\nVideo Card $video
\nSound Card $sound
\nModem $modem
\nOther things:\n$other ");

?>

I call it in html like this
<FORM METHOD=POST ACTION="hardware.php">

Posted: Fri Oct 11, 2002 11:04 am
by twigletmac
What version of PHP are you using, what OS and what web server?

Mac

hmm

Posted: Fri Oct 11, 2002 11:06 am
by mettlehead
it's a linux server with the newest version of php I believe. Any thoughts?

ok never mind

Posted: Fri Oct 11, 2002 11:10 am
by mettlehead
Oh I got it to work. But it show wierd symbols like this Ý what is it?

Posted: Fri Oct 11, 2002 11:11 am
by twigletmac
Can you give us a link to the output?

Mac

Posted: Fri Oct 11, 2002 11:13 am
by twigletmac
You should probably also start using the $_POST array (there's a sticky with more info: viewtopic.php?t=511) since you are using the latest version of PHP so, $name should be $_POST['name'], $email should be $_POST['email'] etc...

Mac

just got it

Posted: Fri Oct 11, 2002 11:15 am
by mettlehead
I just figured it out for now. Thanks and sorry for wasting your time