Note that there are some explanatory texts on larger screens.

plurals
  1. POnew to php, problem with form,POST,and database
    primarykey
    data
    text
    <p>im learning php and to keep it simple (i think), this is what im trying to do below.</p> <p>--Work so far:</p> <p>I made a small mini form and what i want to do is that when the person enters their email address, that a few things happen:</p> <ol> <li>display a dummy message with actual first name based on database info gotten from email entered.</li> <li>delete DB row based on email entered.</li> </ol> <p>the process page that comes next has a custom message like " hello NAME HERE, sorry to see you go blah blah"</p> <p>Now i havent written the account deletion part because im getting an error. i don't get syntax or any other errors in DW or Aptana..just when i test. the error that i receive is: Notice: Use of undefined constant mysqli_error - assumed 'mysqli_error' in line 32 which is this line that has</p> <pre><code>$sn_nameQueryStringResults = mysqli_query($connect2db, $sn_nameQueryString) or die( "Sorry but theres a connection to database error" . mysqli_error); </code></pre> <p>this is what i have so far for the form:</p> <pre><code>&lt;form method="post" action="snDelAcc_proc.php"&gt; &lt;table width="500" border="0"&gt; &lt;tr&gt; &lt;td&gt;Enter your email address here:&lt;/td&gt; &lt;td&gt; &lt;input type="text" name="accDel" width="250" &gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="submit" name="submit"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p></p> <p>and this is the process page:</p> <pre><code>&lt;?php // - - connect to db. $connect2db = mysqli_connect('127.0.0.1','root','passhere','dbtest'); if(!$connect2db){ die("Sorry but theres a connection to database error" . mysqli_error); } //get emailfrom first page. $emailaddy = $_POST['accDel']; $sn_nameQueryString = " SELECT FROM email_list WHERE email = '$emailaddy'"; $sn_nameQueryStringResults = mysqli_query($connect2db, $sn_nameQueryString) or die( "Sorry but theres a connection to database error" . mysqli_error); //get the name with fetch $actualFnameGet = mysqli_fetch_array($sn_nameQueryStringResults); //$sn_query = " DELETE FROM email_list WHERE email= "; echo $actualFnameGet['firstname']; ?&gt; </code></pre> <p>any ideas as to why im wrong? Im a bit lost, thanks in advance.</p>
    singulars
    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.
 

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