Jump to content

form cannot find file


Darkwaldo

Recommended Posts

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>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/102976-form-cannot-find-file/
Share on other sites

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". 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.