Re: Insert MySQL/PHP
| From: | Jason Wong | Date: | Sun, 04 Aug 2002 20:51:27 +0000 |
| Subject: | Re: Insert MySQL/PHP | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20983@lists.php.net to get a copy of this message | ||
On Monday 05 August 2002 04:55, Mike wrote:
> Using RH 7.3 PHP 4.2.2 MySQL 3.23.51 MySQL Client 3.23.29 Apache 1.3.26
>
> I used the LAMP script to compile and build all and all of the PHP works
> except for inserts.
>
> I can insert from MyCC, phpMyAdmin, command line just fine but when
> trying to use a php file that I used to use it will not insert or show
> any errors.PS I like MyCC!!! Very nice!!
>
> I made the file chmod 666 and tried both my root and my normal user
> accounts.
>
> Here's the code.Note: I changed the names to post so one might be
> wrong<G>
When posting code you should always copy & paste and try not to change
anything unless absolutely necessary (stuff like passwords).
[snip]
> // formulate and run query
> $query = "insert into
> skywire(sitename,sent_link,notes,home,wireless,wired,day)
>
> values('$sitename','$sent_link','$notes','$home','$wireless','$wired','$day
>')";
>
> $result = mysql_query($query,$connection) or die("Error in
> query");
What does $query contain?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
I always wake up at the crack of ice.
-- Joe E. Lewis
*/