|
Posted by strawberry on 06/01/06 12:46
OK, well try to narrow the possibilities down a bit. Add something like
the following to the top of your page:
<pre>
<?php
// Let's see what data is successfully passed to this page:
echo "GET";
print_r ($_GET);
echo "POST";
print_r ($_POST);
?>
</pre>
Then add an "or die" statement to the end of your query - something
like this:
$result = mysql_query($query) or die ("Couldn't INSERT");
and echo the query.
echo $query;
Peschtra wrote:
> Strawberry -
>
> Thanks for your help.
>
> I don't know what it means for something to be automated. :(
>
> I changed my script as you suggested and found one missing ' (where you
> suggested in your previous post), but still no luck.
>
> Thanks again,
>
> Peter
>
> I don't know what
>
> strawberry wrote:
> > Marcin's right, 'a query like that is just begging to be automated'
> > but, in any event, writing the query something like this would make
> > those kind of mistakes much easier to spot;
> >
> > $query = "INSERT INTO table
> > (
> > value1, //you can even add comments
> > value2,
> > value3
> > )
> > VALUES
> > (
> > 'value1',
> > 'value2',
> > 'value3'
> > );";
> >
> > mysql_query($query) etc
> >
Navigation:
[Reply to this message]
|