Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Script won't load
    primarykey
    data
    text
    <p>I'm new to web development and have been wrestling with this problem for several hours now, so I've decided to turn to your wisdom. I'm trying to design a little webpage with a database for my wife to store her recipes in, but I'm having trouble getting form submission to work. Here is the code for the webpage where I take the form information in:</p> <pre><code>&lt;html&gt;&lt;body&gt; Enter the information below to add a new ingredient for use in your recipes. &lt;form action="add_to_database.php" method="post"&gt; Name: &lt;input name="name" type="text" /&gt; Serving: &lt;input type="text" name="serving" /&gt; Calories: &lt;input type="text" name="calories" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;/body&gt;&lt;/html&gt; </code></pre> <p>And here is some silly code I've been trying to display on the page to see if I can even get the form submission to work:</p> <pre><code>&lt;html&gt;&lt;body&gt; &lt;?php $name = $_POST['name']; echo $name."&lt;br /&gt;"; ?&gt; &lt;/body&gt;&lt;/html&gt; </code></pre> <p>Unfortunately, the page comes back as completely back (after I hit the submit button). What's absolutely baffling to me is that I've copied and pasted the examples from this <a href="http://www.tizag.com/phpT/forms.php" rel="nofollow">page</a> into some files and everything seems to work fine. So it seems as though apache and php are working correctly, but I'm messing up somewhere along the way. My apologies in advance if this seems like a stupid question but for the life of me I can't figure it out.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload