/    Sign up×
Community /Pin to ProfileBookmark

INSERT Fails Why ?

Folks,

Why this code fails to INSERT ? I get no response after I click button.

[code]
<?php
include(‘error_reporting.php’);
require(‘conn.php’);
//equire(‘link_submission_form.php’);
?>

<form name = “submit_link” method = “POST” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
<label for=”domain”>Domain:</label>
<input type=”text” name=”domain” id=”domain” placeholder=”Input Domain”>
<br>
<label for=”domain_email”>Domain Email:</label>
<input type=”email” name=”domain_email” id=”domain_email” placeholder=”Input Domain Email”>
<br>
<label for=”url”>Url:</label>
<input type=”url” name=”url” id=”url” placeholder=”Input Url”>
<br>
<label for=”link_anchor_text”>Link Anchor Text:</label>
<input type=”text” name=”link_anchor_text” id=”link_anchor_text” placeholder=”Input Link Anchor Text”>
<br>
<textarea rows=”10″ cols=”20″>Page Description</textarea>
<br>
<label for=”keywords”>Keywords:</label>
<input type=”text” name=”keywords” id=”keywords” placeholder=”Input Keywords related to Page”>
<br>
<label for=”tos_agreement”>Agree to TOS or not ?</label>
<select name=”tos_agreement” id=”tos_agreement”>
<option value=”yes”>Yes</option>
<option value=”no”>No</option>
</select>
<br>
<input type=”button” name=”submit_link” id=”submit_link” value=”Submit Link!”>
<br>
<input type=”reset”>
<br>
</form>

<?php

if($_SERVER[‘REQUEST_METHOD’] === ‘POST’)
{
if(ISSET($_POST[‘submit_link’]))
{
$query = “INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords) VALUES ?,?,?,?,?,?”;

$stmt = mysqli_stmt_init($conn);

if(mysqli_stmt_prepare($stmt,$query))
{
mysqli_stmt_bind_param($stmt,’ssssss’,$_POST[‘domain’],$_POST[‘domain_email’],$_POST[‘url’],$_POST[‘link_anchor_text’],$_POST[‘page_description’],$_POST[‘keywords’]);

mysqli_stmt_close($stmt);
mysqli_close($conn);
}
else
{
die(“INSERT failed!”);
}
}
}

?>
[/code]

to post a comment
PHP

16 Comments(s)

Copy linkTweet thisAlerts:
@daveyerwinJul 14.2020 — @developer_web#1620540

this is what I posted in another reply to you ...

#########################

Q2.

On some tutorials, I see the Submit button code to be like the following if I remember correctly. None of them are not the same as the one I mentioned just above.

Which ones are correct ? Give your ranking according to preference ....

<input type = "button" value = "submit">

correct But does not submit form

<input type = "submit" value = "submit">

correct and submits form

##############

this is what you have in your form ...

<input type="button" name="submit_link" id="submit_link" value="Submit Link!">
Copy linkTweet thisAlerts:
@developer_webauthorJul 16.2020 — @DaveyErwin#1620545

Ok. Thanks. Fixed the button but I still get no response after clicking the submit button. :(

<i>
</i>&lt;?php
ini_set('error_reporting','E_ALL');//Same as: error_reporting(E_ALL);
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
?&gt;

&lt;form name = "submit_link" method = "POST" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;
&lt;label for="domain"&gt;Domain:&lt;/label&gt;
&lt;input type="text" name="domain" id="domain" placeholder="Input Domain"&gt;
&lt;br&gt;
&lt;label for="domain_email"&gt;Domain Email:&lt;/label&gt;
&lt;input type="email" name="domain_email" id="domain_email" placeholder="Input Domain Email"&gt;
&lt;br&gt;
&lt;label for="url"&gt;Url:&lt;/label&gt;
&lt;input type="url" name="url" id="url" placeholder="Input Url"&gt;
&lt;br&gt;
&lt;label for="link_anchor_text"&gt;Link Anchor Text:&lt;/label&gt;
&lt;input type="text" name="link_anchor_text" id="link_anchor_text" placeholder="Input Link Anchor Text"&gt;
&lt;br&gt;
&lt;textarea rows="10" cols="20"&gt;Page Description&lt;/textarea&gt;
&lt;br&gt;
&lt;label for="keywords"&gt;Keywords:&lt;/label&gt;
&lt;input type="text" name="keywords" id="keywords" placeholder="Input Keywords related to Page"&gt;
&lt;br&gt;
&lt;input type="button" value="submit!"&gt;
&lt;br&gt;
&lt;input type="reset"&gt;
&lt;br&gt;
&lt;/form&gt;

&lt;?php

if($_SERVER['REQUEST_METHOD'] === 'POST')
{
if(ISSET($_POST['submit_link']))
{
mysqli_report(MYSQLI_REPORT_ALL|MYSQLI_REPORT_STRICT);
mysqli_connect("localhost","root","","links");
$conn-&gt;set_charset("utf8mb4");

<i> </i> if(mysqli_connect_error())
<i> </i> {
<i> </i> echo "Could not connect!" . mysqli_connect_error();
<i> </i> }
<i> </i>
<i> </i> $query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords) VALUES ?,?,?,?,?,?";

<i> </i> $stmt = mysqli_stmt_init($conn);

<i> </i> if(mysqli_stmt_prepare($stmt,$query))
<i> </i> {
<i> </i> mysqli_stmt_bind_param($stmt,'ssssss',$_POST['domain'],$_POST['domain_email'],$_POST['url'],$_POST['link_anchor_text'],$_POST['page_description'],$_POST['keywords']);
<i> </i> mysqli_stmt_execute($stmt);
<i> </i>
<i> </i> mysqli_stmt_close($stmt);
<i> </i> mysqli_close($conn);
<i> </i> }
<i> </i> else
<i> </i> {
<i> </i> die("INSERT failed!");
<i> </i> }
<i> </i>}
}

?&gt;
Copy linkTweet thisAlerts:
@act78723Jul 16.2020 — > @developer_web#1620673 mysqli_connect("localhost","root","","links");

Are you getting any errors? If so, please post them. Do you have your database set up without a root password? If you have a root password, you must include it in the mysqli_connection parameters. It would help if we could see your conn.php. When you post it, replace your password with xxx.
Copy linkTweet thisAlerts:
@developer_webauthorJul 16.2020 — I changed this:
<i>
</i>$query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES ?,?,?,?,?,?,?,?";
[


to this:

<i>
</i>$query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES (?,?,?,?,?,?,?,?)";
[


But no luck. It does not INSERT into db!
Copy linkTweet thisAlerts:
@act78723Jul 16.2020 — Is links the name of a table in your database or the name of the database or the name of both the database and table?
Copy linkTweet thisAlerts:
@daveyerwinJul 16.2020 — <input type="button" value="submit!">

the above line will not submit form
Copy linkTweet thisAlerts:
@developer_webauthorJul 16.2020 — @act78723#1620699

"links" is only tbl name.

I spotted my error and so made a few changes. this is what I did ...

I have now changed the db to "test" and tbl name still remains as "links".

Still above code doesn't work when I changed this to:
<i>
</i>mysqli_connect("localhost","root","","test");


This INSERT fails STILL:
<i>
</i>$query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES (?,?,?,?,?,?,?,?)";


Originally, it was like this:
<i>
</i>$query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES ?,?,?,?,?,?,?,?";

NOTE no brackets before and after the question marks.

So, changed it to this now but still not INSERTING! Drat!
<i>
</i>$query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES (?,?,?,?,?,?,?,?)";


Failure ...
<i>
</i>&lt;?php
//include('error_reporting.php');
ini_set('error_reporting','E_ALL');//Same as: error_reporting(E_ALL);
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
?&gt;

&lt;form name = "submit_link" method = "POST" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;
&lt;label for="domain"&gt;Domain:&lt;/label&gt;
&lt;input type="text" name="domain" id="domain" placeholder="Input Domain"&gt;
&lt;br&gt;
&lt;label for="domain_email"&gt;Domain Email:&lt;/label&gt;
&lt;input type="email" name="domain_email" id="domain_email" placeholder="Input Domain Email"&gt;
&lt;br&gt;
&lt;label for="url"&gt;Url:&lt;/label&gt;
&lt;input type="url" name="url" id="url" placeholder="Input Url"&gt;
&lt;br&gt;
&lt;label for="link_anchor_text"&gt;Link Anchor Text:&lt;/label&gt;
&lt;input type="text" name="link_anchor_text" id="link_anchor_text" placeholder="Input Link Anchor Text"&gt;
&lt;br&gt;
&lt;textarea rows="10" cols="20"&gt;Page Description&lt;/textarea&gt;
&lt;br&gt;
&lt;label for="keywords"&gt;Keywords:&lt;/label&gt;
&lt;input type="text" name="keywords" id="keywords" placeholder="Input Keywords related to Page"&gt;
&lt;br&gt;
&lt;input type="checkbox" name="alert_visitor_type" id="alert_visitor_type" value="Give Alert: Visitor Type"&gt;
&lt;/label for="alert_visitor_type"&gt;Give Alert: Visitor Type&lt;/lablel&gt;
&lt;input type="checkbox" name="alert_visitor_potential" id="alert_visitor_potential" value="Give Alert: Potential Visitor"&gt;
&lt;/label for="alert_visitor_potential"&gt;Give Alert: Potential Visitor&lt;/lablel&gt;
&lt;br&gt;
&lt;input type="radio" name="tos_agree" id="tos_agree_yes" value="yes"&gt;
&lt;label for="tos_agree_yes"&gt;Yes:&lt;/label&gt;
&lt;input type="radio" name="tos_agree" id="tos_agree_no" value="no"&gt;
&lt;label for="tos_agree_no"&gt;No:&lt;/label&gt;
&lt;br&gt;
&lt;label for="tos_agreement"&gt;Agree to TOS or not ?&lt;/label&gt;
&lt;select name="tos_agreement" id="tos_agreement"&gt;
&lt;option value="yes"&gt;Yes&lt;/option&gt;
&lt;option value="no"&gt;No&lt;/option&gt;
&lt;/select&gt;
&lt;br&gt;
&lt;button type="submit"&gt;Click me&lt;/button&gt;
&lt;br&gt;
&lt;input type="reset"&gt;
&lt;br&gt;
&lt;/form&gt;

&lt;?php

if($_SERVER['REQUEST_METHOD'] === 'POST')
{
/*
if(ISSET($_POST['submit_link']))
{*/
mysqli_report(MYSQLI_REPORT_ALL|MYSQLI_REPORT_STRICT);
mysqli_connect("localhost","root","","test");
$conn-&gt;set_charset("utf8mb4");

<i> </i> if(mysqli_connect_error())
<i> </i> {
<i> </i> echo "Could not connect!" . mysqli_connect_error();
<i> </i> }
<i> </i>
<i> </i> $query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES (?,?,?,?,?,?,?,?)";

<i> </i> $stmt = mysqli_stmt_init($conn);

<i> </i> if(mysqli_stmt_prepare($stmt,$query))
<i> </i> {
<i> </i> mysqli_stmt_bind_param($stmt,'ssssssss',$_POST['domain'],$_POST['domain_email'],$_POST['url'],$_POST['link_anchor_text'],$_POST['page_description'],$_POST['keywords'],$_POST['alert_visitor_type'],$_POST['alert_visitor_potential']);
<i> </i> mysqli_stmt_execute($stmt);
<i> </i>
<i> </i> mysqli_stmt_close($stmt);
<i> </i> mysqli_close($conn);
<i> </i> }
<i> </i> else
<i> </i> {
<i> </i> die("INSERT failed!");
<i> </i> }
<i> </i>//}
}

?&gt;


Test my code in your Xampp, people. What is wrong with the code ?
Copy linkTweet thisAlerts:
@daveyerwinJul 16.2020 — you need to confirm that you are actually

connecting to a database table

Copy linkTweet thisAlerts:
@developer_webauthorJul 16.2020 — Update:

I made the form action="".

But still not luck:

<i>
</i>
&lt;form name = "submit_link" method = "POST" action=""&gt;

Copy linkTweet thisAlerts:
@act78723Jul 16.2020 — What errors, if any, are you getting?
Copy linkTweet thisAlerts:
@developer_webauthorJul 16.2020 — People,

I am feeling gloomy for 2 nights now why this ain't INSERTING:
<i>
</i>&lt;?php
//include('error_reporting.php');
ini_set('error_reporting','E_ALL');//Same as: error_reporting(E_ALL);
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
?&gt;

&lt;form name = "submit_link" method = "POST" action=""&gt;
&lt;label for="domain"&gt;Domain:&lt;/label&gt;
&lt;input type="text" name="domain" id="domain" placeholder="Input Domain"&gt;
&lt;br&gt;
&lt;label for="domain_email"&gt;Domain Email:&lt;/label&gt;
&lt;input type="email" name="domain_email" id="domain_email" placeholder="Input Domain Email"&gt;
&lt;br&gt;
&lt;label for="url"&gt;Url:&lt;/label&gt;
&lt;input type="url" name="url" id="url" placeholder="Input Url"&gt;
&lt;br&gt;
&lt;label for="link_anchor_text"&gt;Link Anchor Text:&lt;/label&gt;
&lt;input type="text" name="link_anchor_text" id="link_anchor_text" placeholder="Input Link Anchor Text"&gt;
&lt;br&gt;
&lt;textarea rows="10" cols="20"&gt;Page Description&lt;/textarea&gt;
&lt;br&gt;
&lt;label for="keywords"&gt;Keywords:&lt;/label&gt;
&lt;input type="text" name="keywords" id="keywords" placeholder="Input Keywords related to Page"&gt;
&lt;br&gt;
&lt;input type="checkbox" name="alert_visitor_type" id="alert_visitor_type" value="Give Alert: Visitor Type"&gt;
&lt;/label for="alert_visitor_type"&gt;Give Alert: Visitor Type&lt;/lablel&gt;
&lt;input type="checkbox" name="alert_visitor_potential" id="alert_visitor_potential" value="Give Alert: Potential Visitor"&gt;
&lt;/label for="alert_visitor_potential"&gt;Give Alert: Potential Visitor&lt;/lablel&gt;
&lt;br&gt;
&lt;input type="radio" name="tos_agree" id="tos_agree_yes" value="yes"&gt;
&lt;label for="tos_agree_yes"&gt;Yes:&lt;/label&gt;
&lt;input type="radio" name="tos_agree" id="tos_agree_no" value="no"&gt;
&lt;label for="tos_agree_no"&gt;No:&lt;/label&gt;
&lt;br&gt;
&lt;label for="tos_agreement"&gt;Agree to TOS or not ?&lt;/label&gt;
&lt;select name="tos_agreement" id="tos_agreement"&gt;
&lt;option value="yes"&gt;Yes&lt;/option&gt;
&lt;option value="no"&gt;No&lt;/option&gt;
&lt;/select&gt;
&lt;br&gt;
&lt;button type="submit"&gt;Click me&lt;/button&gt;
&lt;br&gt;
&lt;input type="reset"&gt;
&lt;br&gt;
&lt;/form&gt;

&lt;?php

if($_SERVER['REQUEST_METHOD'] === 'POST')
{
/*
if(ISSET($_POST['submit_link']))
{*/
mysqli_report(MYSQLI_REPORT_ALL|MYSQLI_REPORT_STRICT);
mysqli_connect("localhost","root","","test");
$conn-&gt;set_charset("utf8mb4");

<i> </i> if(mysqli_connect_error())
<i> </i> {
<i> </i> echo "Could not connect!" . mysqli_connect_error();
<i> </i> }
<i> </i>
<i> </i> $query = "INSERT into links (domain,domain_email,url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES (?,?,?,?,?,?,?,?)";

<i> </i> $stmt = mysqli_stmt_init($conn);

<i> </i> if(mysqli_stmt_prepare($stmt,$query))
<i> </i> {
<i> </i> mysqli_stmt_bind_param($stmt,'ssssssss',$_POST['domain'],$_POST['domain_email'],$_POST['url'],$_POST['link_anchor_text'],$_POST['page_description'],$_POST['keywords'],$_POST['alert_visitor_type'],$_POST['alert_visitor_potential']);
<i> </i> mysqli_stmt_execute($stmt);
<i> </i>
<i> </i> mysqli_stmt_close($stmt);
<i> </i> mysqli_close($conn);
<i> </i> }
<i> </i> else
<i> </i> {
<i> </i> die("INSERT failed!");
<i> </i> }
<i> </i>//}
}

?&gt;


Try on your Xampp and see if you can figure-out just what the heck is wrong!
Copy linkTweet thisAlerts:
@daveyerwinJul 16.2020 — here is working example using prepared staements ...


``<i>
</i>&lt;?php
//include('error_reporting.php');
ini_set('error_reporting','E_ALL');//Same as: error_reporting(E_ALL);
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
?&gt;

&lt;form method = "POST" action=""&gt;
&lt;label for="keywords"&gt;Keywords:*&lt;/label&gt;
&lt;input type="text" name="keywords" id="keywords" placeholder="Input Keywords" required&gt;
&lt;br&gt;
&lt;button name=search_links value=" "&gt;send&lt;/button&gt;
&lt;br&gt;
&lt;input type="reset"&gt;
&lt;br&gt;
&lt;/form&gt;

&lt;?php

if($_SERVER['REQUEST_METHOD'] === 'POST')
{
if(ISSET($_POST['search_links']))
{
if(ISSET($_POST['keywords']))
{
$keywords = $_POST['keywords'];
}

$servername = "localhost";
$username = "x-x-x-x-x-x-x-";
$password = "x-x--x-x--x-x";
$dbname = "x-x-x-x-x-x-x-x-";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: ");
}

$sql = "CREATE TABLE IF NOT EXISTS Test (
link VARCHAR(255) NOT NULL
) ";
if($result=mysqli_query($conn, $sql)){
echo 'table created successfully&lt;br&gt;';
}
else {
echo 'Error creating table&lt;br&gt;' ;
}


$sql = "INSERT into Test (link) VALUES (?)";
$stmt = mysqli_stmt_init($conn);
mysqli_stmt_prepare($stmt,$sql);
mysqli_stmt_bind_param($stmt, "s", $keywords);
mysqli_stmt_execute($stmt);


$sql = "SELECT * FROM Test";
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) &gt; 0) {
// output data of each row
while($row = mysqli_fetch_array($result)) {
echo $row[0]. "&lt;br&gt;";
}
} else {
echo "0 results";
}

mysqli_close($conn);
}}
?&gt;<i>
</i>
``


this is a working example

put it on your server

if it doesn't work

post here

if it works begin to change it to suit you

test after every change no matter how small a change

when you have problems post here
Copy linkTweet thisAlerts:
@developer_webauthorJul 17.2020 — @act78723#1620712

I get no errors. That is the mystery!
Copy linkTweet thisAlerts:
@developer_webauthorJul 17.2020 — @DaveyErwin#1620733

Dave,

Thanks man!

No one in this forum or another could figure out what the problem was. I got a handful of programmers in this forum and another that usualyl are able to help me but on this occassion everyone failed BUT YOU!

2 of my threads will be closed soon thanks to you.

The issue was the buttons I was using weren't working. Your button did.

look at my current code. You will see your button and a few of my own above your's. none of my buttons work. test it for yourself!

<i>
</i>&lt;?php
//include('error_reporting.php');
ini_set('error_reporting',E_ALL);//Same as: error_reporting(E_ALL);
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
?&gt;

&lt;form name = "submit" method = "POST" action=""&gt;
&lt;label for="domain"&gt;Domain:&lt;/label&gt;
&lt;input type="text" name="domain" id="domain" placeholder="Input Domain"&gt;
&lt;br&gt;
&lt;label for="domain_email"&gt;Domain Email:&lt;/label&gt;
&lt;input type="email" name="domain_email" id="domain_email" placeholder="Input Domain Email"&gt;
&lt;br&gt;
&lt;label for="url"&gt;Url:&lt;/label&gt;
&lt;input type="url" name="url" id="url" placeholder="Input Url"&gt;
&lt;br&gt;
&lt;label for="link_anchor_text"&gt;Link Anchor Text:&lt;/label&gt;
&lt;input type="text" name="link_anchor_text" id="link_anchor_text" placeholder="Input Link Anchor Text"&gt;
&lt;br&gt;
&lt;textarea rows="10" cols="20"&gt;Page Description&lt;/textarea&gt;
&lt;br&gt;
&lt;label for="keywords"&gt;Keywords:&lt;/label&gt;
&lt;input type="text" name="keywords" id="keywords" placeholder="Input Keywords related to Page"&gt;
&lt;br&gt;
&lt;input type="checkbox" name="alert_visitor_type" id="alert_visitor_type" value="Give Alert: Visitor Type"&gt;
&lt;/label for="alert_visitor_type"&gt;Give Alert: Visitor Type&lt;/lablel&gt;
&lt;input type="checkbox" name="alert_visitor_potential" id="alert_visitor_potential" value="Give Alert: Potential Visitor"&gt;
&lt;/label for="alert_visitor_potential"&gt;Give Alert: Potential Visitor&lt;/lablel&gt;
&lt;br&gt;
&lt;input type="radio" name="tos_agree" id="tos_agree_yes" value="yes"&gt;
&lt;label for="tos_agree_yes"&gt;Yes:&lt;/label&gt;
&lt;input type="radio" name="tos_agree" id="tos_agree_no" value="no"&gt;
&lt;label for="tos_agree_no"&gt;No:&lt;/label&gt;
&lt;br&gt;
&lt;label for="tos_agreement"&gt;Agree to TOS or not ?&lt;/label&gt;
&lt;select name="tos_agreement" id="tos_agreement"&gt;
&lt;option value="yes"&gt;Yes&lt;/option&gt;
&lt;option value="no"&gt;No&lt;/option&gt;
&lt;/select&gt;
&lt;br&gt;
&lt;button type="submit"&gt;Submit&lt;/button&gt;
&lt;button type="submit" value="submit"&gt;Submit&lt;/button&gt;
&lt;input type="submit" value="submit"&gt;
&lt;button name=submit value=" "&gt;Submit&lt;/button&gt;
&lt;br&gt;
&lt;input type="reset"&gt;
&lt;br&gt;
&lt;/form&gt;

&lt;?php

if($_SERVER['REQUEST_METHOD'] === 'POST')
{
if(isset($_POST['submit']))
{
//Re-write the following 4 lines ...
mysqli_report(MYSQLI_REPORT_ALL|MYSQLI_REPORT_STRICT);
$conn = mysqli_connect("localhost","root","","test");
$conn-&gt;set_charset("utf8mb4");

<i> </i> $query = "INSERT into links (domain,domain_email,page_url,link_anchor_text,page_description,keywords,alert_visitor_type,alert_visitor_potential) VALUES (?,?,?,?,?,?,?,?)";

<i> </i> $stmt = mysqli_stmt_init($conn);

<i> </i> if(mysqli_stmt_prepare($stmt,$query))
<i> </i> {
<i> </i> mysqli_stmt_bind_param($stmt,'ssssssss',$_POST['domain'],$_POST['domain_email'],$_POST['url'],$_POST['link_anchor_text'],$_POST['page_description'],$_POST['keywords'],$_POST['alert_visitor_type'],$_POST['alert_visitor_potential']);
<i> </i> if(mysqli_stmt_execute($stmt) === FALSE)
<i> </i> {
<i> </i> printf("Error: %s.n", mysqli_stmt_error($stmt));
<i> </i> printf("Error: %d.n", mysqli_stmt_errno($stmt));
<i> </i> }
<i> </i>
<i> </i> mysqli_stmt_close($stmt);
<i> </i> mysqli_close($conn);
<i> </i> }
<i> </i> else
<i> </i> {
<i> </i> die("Did not INSERT!");
<i> </i> }
<i> </i>}
<i> </i>else
<i> </i>{
<i> </i> die("Did Not POST-&gt;Submit!");
<i> </i>}
}
else
{
die("Did Not REQUEST_METHOD!");
}

?&gt;
Copy linkTweet thisAlerts:
@daveyerwinJul 17.2020 — <button type="submit">Submit</button>

<button type="submit" value="submit">Submit</button>

<input type="submit" value="submit">

<button name=submit value=" ">Submit</button>

if you would learn HTML Forms you would know

a name is required for the element value to be

submitted to the server

had you first began to learn HTML Forms

you would have had no need to post here

I have so enjoyed replying to your posts

I really needed this refresher course

Thank You and do post again
Copy linkTweet thisAlerts:
@developer_webauthorJul 17.2020 — This thread may now be closed as issue solved!
×

Success!

Help @developer_web spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...