Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Edit:</strong> Ignore this please, didn't read your question completely as it seems</p> <p>Try something like this:</p> <p>index.php</p> <pre><code>&lt;form name="g-form" action="gbtn-exec.php" method="post" class="goat-vote" onsubmit="return validategForm()"&gt; &lt;input type="text" name="g-product" placeholder="Brand / Product Name" style="-moz-border-radius: 5px; border-radius: 5px; padding-left:20px; opacity:.5; border:none; margin-left:110px; width:440px; height:38px; font-family:'Proxima Nova Rg';color:#000; font:1.6em;" /&gt; &lt;p class="g-question"&gt;Why you love it?&lt;/p&gt; &lt;textarea name="g-reason" style="-moz-border-radius: 5px; border-radius: 5px; padding:5px; opacity:.5; border:none; margin-left:110px; width:450px; height:150px; font-family:'Proxima Nova Rg';color:#333; font-size:1em;"&gt;&lt;/textarea&gt; &lt;?php if(!isset($_GET['hidesubmit'])): ?&gt; &lt;input name="g-btn" class="vote-btn" type="submit" value="vote" style="margin-left:470px; cursor:pointer;"&gt; &lt;?php endif; ?&gt; &lt;/form&gt; </code></pre> <p>exec.php</p> <pre><code>if ($_POST["g-product"] &amp;&amp; $_POST["g-reason"] != "" ) { $gproduct = $_POST["g-product"]; $greason = $_POST["g-reason"]; $insert ="INSERT INTO jovine.vote (vote_id ,product_name ,reason ,type) VALUES (NULL, '$gproduct', '$greason', 'goat')"; $result = mysql_query($insert,$con); echo "&lt;script&gt;"; echo "alert('Thank you. Your vote has been recorded.');"; echo "window.location.href='index.php?hidesubmit=1';"; echo "&lt;/script&gt;"; } </code></pre>
 

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