On Wed, November 9, 2005 1:15 pm, Stewart Priest wrote:
> I've written this script shown below. It gets its variables from a
> form, and then it (supposedly!) writes these values into a MySQL table
> ('invoices').
>
> The script executes with no errors, but when I check the table, the
> table is st
Stewart Priest wrote:
What is the structure of that table?
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| invoice_no| int(10) | YES |
What is the structure of that table?
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| invoice_no| int(10) | YES | | NULL| |
| i
Stewart Priest <[EMAIL PROTECTED]>
Date: Wednesday, November 9, 2005 2:43 pm
Subject: Re: [PHP] Unable to send variables to MySQL table
>
> print $add_to_db;
>
>
> Thanks for all your replies! I didn't expect to get one so quick,
> so thanks!
>
> After I did the
What is the structure of that table?
On 11/9/05, Stewart Priest <[EMAIL PROTECTED]> wrote:
>
> print $add_to_db;
>
>
> Thanks for all your replies! I didn't expect to get one so quick, so thanks!
>
> After I did the above, I pasted the output into MySQL. Guess what? It didn't
> work!
>
> I was o
print $add_to_db;
Thanks for all your replies! I didn't expect to get one so quick, so thanks!
After I did the above, I pasted the output into MySQL. Guess what? It didn't
work!
I was only sending values for $item1_desc and $item1_cost. Because I was not
sending values for the other columns, I
>
> Any ideas? The code is below.
> mysql_query($add_to_db);
Hi Stewart. Your query is failing for some reason (as others here have
mentioned). I would change the above line to read:
mysql_query($add_to_db) or die(mysql_error()."$add_to_db");
This will make the script die, and will print the
print $add_to_db;
should print out the entire insert line and you can just double check
that your values are full, otherwise like Jay said I would check and
make sure the user you have in your connect string can write to the
db.
On 11/9/05, Stewart Priest <[EMAIL PROTECTED]> wrote:
> Hi folks...
Hi Stewart,
Wednesday, November 9, 2005, 7:15:39 PM, you wrote:
> The script executes with no errors, but when I check the table, the
> table is still empty. I can manually insert the data directly into
> the table, and when I echo the variables in the script, the values
> are displayed whe I run
[snip]
Any ideas? The code is below.
[/snip]
Does your MySQL connection have permission to insert to the table?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi folks... a bit of a newbie question I'm afraid...
I've written this script shown below. It gets its variables from a form, and
then it (supposedly!) writes these values into a MySQL table ('invoices').
The script executes with no errors, but when I check the table, the table is
still empty.
11 matches
Mail list logo