|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Can't insert and no error messages
I'm having trouble connecting to me db, so I created a one entry form to test it. I'm getting nothing.
This is my form <HTML> <BODY> <form method="post" action="testinsert.php"> Account Name: <input type="Text" name="account" size="80"> <input type="submit" name=submit value="Submit New Account"> </form> </body> </HTML> _______________________________________ This is testinsert.php |
|
#2
|
|||
|
|||
|
RE: Can't insert and no error messages
when you echo the $account variable do you see the value? If not try $_POST["account"].
|
|
#3
|
|||
|
|||
|
RE: Can't insert and no error messages
it does echo $account but nothing shows in the database.
The user has full access and it is a VARCHAR(40) record. |
|
#4
|
|||
|
|||
|
RE: Can't insert and no error messages
I see the problem,
you have the 'or die' in the incorrect place the wrong one... $sql = "INSERT INTO test (junk) VALUES ($account)" or die ("failed writing to database"); echo "$account"; echo "asdf"; $result = mysql_query($sql); try this $sql = "INSERT INTO test (junk) VALUES ($account)"; echo "$account"; echo "asdf"; $result = mysql_query($sql) or die ("failed writing to database"); |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Can't insert and no error messages |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|