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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.