Need simple html php help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mettlehead
Forum Newbie
Posts: 15
Joined: Fri Oct 11, 2002 11:03 am
Location: Canada

Need simple html php help

Post 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">
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

What version of PHP are you using, what OS and what web server?

Mac
mettlehead
Forum Newbie
Posts: 15
Joined: Fri Oct 11, 2002 11:03 am
Location: Canada

hmm

Post by mettlehead »

it's a linux server with the newest version of php I believe. Any thoughts?
mettlehead
Forum Newbie
Posts: 15
Joined: Fri Oct 11, 2002 11:03 am
Location: Canada

ok never mind

Post by mettlehead »

Oh I got it to work. But it show wierd symbols like this Ý what is it?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Can you give us a link to the output?

Mac
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
mettlehead
Forum Newbie
Posts: 15
Joined: Fri Oct 11, 2002 11:03 am
Location: Canada

just got it

Post by mettlehead »

I just figured it out for now. Thanks and sorry for wasting your time
Post Reply