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
shift numbers with paging
HiHow would i be able to display 10 numbers 1 2 3 4 5 6 7 8 9 10 and when I click next then 2 3 4 5 6 7 8 9 10 11 and click next then 3 4 5 6 7 8 9 10 11 12are displayed.i am using a for loop to echo
sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is something wrong with my sql statement below is the error and the code. what I am trying to do is to edit
How can you detect variable string in a massive string?
Ok guys, i need some help with this one.I am going to be getting a large string, like 10-20 paragraphs. I will also have an array or words that i would like to search it for.
MySQL noob question
hi guysI have a simple mysql table set up, along the lines of Col 1 - Col 2 - Date_last_updated--------------------------------Som - Some - 06/11/2009 23:23:23Bob - Bob - 06/11/2009 23:30:30and so
MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them in database. I have issues while inserting...foreach ($sentences as $final) {......else {
SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
Parse Error with doctype
I'm getting a parse error with this simple code. I don't get it. It worked one time then when I reloaded the page in FF the code throws this parse error. Parse error: parse error in
Memory Allocation
Hi folks,see this ex:int v=5;v=v+10;then what will do the compiler before the output come as 15.Please explain me technically.
form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the form i get this..test.php?search=example&submit=searchhow do i get all of this together in the
How to insert random unique values in 2 columns ?
I have table with 2 columns