Darkwaldo Posted April 26, 2008 Share Posted April 26, 2008 I've recently began learning how to use php and I have ran into a problem when trying to use forms. When I open the page with the form, enter the data, and press the submit button I get the following error. Firefox can't find the file at /C:/xampp/htdocs/”formpro.php”?”Name”=afddsf&SUBMIT=Submit. I'm not sure why this is occurring; both of the files are in the same folder, and php is working fine with other files and both files I am using for the form work fine separately. Why is this occurring? Heres my code: form1.html <html> <head> <title>Say My Name</title> <style type=”text/css”> TD{color:#353535;font-family:verdana} TH{color:#FFFFFF;font-family:verdana;background-color:#336699} </style> </head> <body> <form action=”formpro.php” method=”post”> <table border=”0” cellspacing=”1” cellpadding=”3” bgcolor=”#353535” align=”center”> <tr> <td bgcolor=”#FFFFFF” width=”50%”>Name</td> <td bgcolor=”#FFFFFF” width=”50%”> <input type=”text” name=”Name”><br> </td> </tr> <tr> <td bgcolor=”#FFFFFF” colspan=”2” align=”center”> <input type="submit" value="Submit" name="SUBMIT" class="submit"/> </td> </tr> </table> </form> </body> </html> formpro.php <html> <head> <title>Say My Name</title> </head> <body> <?php echo “Hello “ . $_POST[‘Name’]; ?> <pre> DEBUG : <?php print_r($_POST); ?> </pre> </body> </html> Quote Link to comment Share on other sites More sharing options...
Darkwaldo Posted April 26, 2008 Author Share Posted April 26, 2008 One other thing. I am using xampp for my operating environment. Quote Link to comment Share on other sites More sharing options...
Fadion Posted April 26, 2008 Share Posted April 26, 2008 What the hell are those double quotes “ and singles quotes ’ ? Try replacing them with normal ones, " and ' and see if that fix the issue. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted April 26, 2008 Share Posted April 26, 2008 You copy pasted the coder or somewhat pieces of it, and Microsoft Word, Or some websites show the quotes weird, you need to replace them as stated above. Quote Link to comment Share on other sites More sharing options...
Darkwaldo Posted April 26, 2008 Author Share Posted April 26, 2008 Alright. That worked, thanks, but now php isn't. Here is my current code <html> <head> <title></title> </head> <body> <?php echo "hello" . $_POST['name']; ?> <pre> DEBUG : <?php print_r($_POST); ?> </pre> </body> </html> When I open the html form, fill it out and hit submit, the above file opens, but the only thing that appears on the screen is "DEBUG". Quote Link to comment Share on other sites More sharing options...
dezkit Posted April 26, 2008 Share Posted April 26, 2008 <html> <head> <title></title> </head> <body> <?php echo "hello " . $_POST['name']; ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.