![]() |
|
#1
|
|||
|
|||
My First SQL Database and PHP FormSQL Gurus I Need help! Below is the code for my php form and my process that is supposed to enter the info in the database.
I keep getting "Couldn't execute query." Can anyone tell me what I've done wrong? PHP Form: PHP Code:
Process to insert into DB: PHP Code:
Last edited by admin : 14-Aug-2008 at 18:25.
Reason: Please insert your example PHP codes between [PHP] and [/PHP] tags
|
|||
|
#2
|
||||
|
||||
Re: My First SQL Database and PHP FormAdd the mysql error to the die message:
PHP Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: My First SQL Database and PHP FormPk I've ran the check and it says no database selected but isn't that what this code is for:
$user="Trey"; $host="localhost"; $password="abbe12"; $database = "PartyData"; $cxn = mysql_connect($host,$user,$password) or die ("couldn't connect to server"); mysql_select_db($database); ???? Im sorry I'm such a NOOB |
|
#4
|
|||
|
|||
Re: My First SQL Database and PHP FormOk now I feel like a total idiot. I had the wrong DB name. thanks for your help that solved it!!!!!!!!!!!!!!!
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| make a website using Php and SQL | oggie | Web Design Forum | 8 | 19-Aug-2008 08:57 |
| automatically assigning a number into the database from php | markyp | MySQL / PHP Forum | 2 | 01-May-2007 10:12 |
| Unlimited Domain Hosting – Reselling with Windows 2003| Linux | CF MX | SQL | ASP.NET | JodoHost | Web Hosting Advertisements & Offers | 0 | 04-Apr-2007 23:08 |
| Form Validation Issue | petenyce405 | MySQL / PHP Forum | 3 | 11-Jan-2005 22:35 |
| Parsing PHP code that's stored in a database. | JdS | MySQL / PHP Forum | 3 | 13-May-2004 10:15 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The