Hi there,
I am trying to insert some data into a database, but for some reason, it is not inserting.
Can anyone see anything wrong with my code:
<?php
$host = "***";
$username = "***";
$password = "***";
$connection = mysql_connect($host, $username, $password);
mysql_select_db("***, $connection");
mysql_query("INSERT INTO events14 (name)
VALUES ('$_POST[name]')");
?>
I have also set up an ID field which auto increments and this seems to be working, but nothing is being entered into the "name" field.
This is my form:
<form action="add_event.php" method="post">
<input type="text" name="name" id="textfield" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
The file with the php code is called add_event.php, so everything is on one page.
Any ideas what I have wrong
Keeping data in form
How can I keep whatever I write in the form?
Take info from one coloum and move to another
Hi all,I have this:Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_id BETWEEN '1' and '5' ";$res = mysql_query($array);$count = 0;while ($row = mysql_fetch_assoc($res)){ if
present value of sequence?
Hi
Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email confirmation process.Here is my code :Line number On/Off | Expand/Contract <?php//sessions
Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow people to login but prevent multiple logins with the same username. Everything appears to work fine
keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My index,html file had to be renamed to index.php because i am using a include function, I got told that if
Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.What the code should do:Using Curl the code should "grab" the xml data from a specified URL.It should then
captcha error
I have been trying to implement a captcha in php...here is the code..Code: (php) [Select]<?php// Set the content-typeheader('Content-type: image/png');// Create the image$im =
Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix the error as well?Thanks
creating a 1 to 100 in a table
hi guys I am a newb in php need some help. I have a table with 1 column and 100 rows and in each i want to do a 1-100. Can someone give me the full coding for this, please I can get it to work. I