They should have data. here's the form code:
function write_form() {
echo "";
echo "Enter url of large picture: name='picture' />";
echo "Enter url of thumbnail: name='thumbnail' />";
echo "";
echo "";
}
I've done everything excatly how my PHP boo
Hi
> Alright, I did that. I now get :
> INSERT INTO domains ( picture, thumbnail ) values( '', '')
>
> and no data entered.
Then for some reason your variables are empty. Make sure they have data
on entry to the function. If they don't keep backtracking until you
find where it's lost.
Niel
Alright, I did that. I now get :
INSERT INTO domains ( picture, thumbnail ) values( '', '')
and no data entered.
/* never take a hiatus from programming for a year */
- Original Message -
From: "Niel Archer" <[EMAIL PROTECTED]>
To:
Sent: Saturday, January 27, 2007 8:29 PM
Subject: Re
I'm using PHP 5, I'm running this off of my personal laptop so I downloaded
ApacheTriad2
- Original Message -
From: "Stephen Johnson" <[EMAIL PROTECTED]>
To: "Alexander" <[EMAIL PROTECTED]>; "PHP-DB"
Sent: Saturday, January 27, 2007 8:24 PM
Subject: Re: [PHP-DB] Am I missing something?
Hi
you need to change this:
> $insert = 'INSERT INTO domains ( picture, thumbnail ) values( "$picture",
> "$thumbnail")';
to be:
$insert = "INSERT INTO domains ( picture, thumbnail ) values( '$picture',
'$thumbnail')";
variables are only interpreted inside double quoted strings. Within
single
What version of php are using? It is odd that mysql_real_escape_string is
undefined..
Alternately you could addslashes...
Hope this helps
http://www.ouradoptionblog.com
Join our journey of adoption
http://www.thelonecoder.com
[EMAIL PROTECTED]
continuing the struggle against bad code
*/
?>
Alright, this may be the problem:
Fatal error: Call to undefined function mysql_real_escape_string() in
C:\apache2triad\htdocs\gallery.php on line 10
which is refering to :
$picture = mysql_real_escape_string($picture);
/* never again use direct code from an example in a book, there's alway
No change.
I echod my insert statement and got : INSERT INTO domains ( picture,
thumbnail ) values( "$picture", "$thumbnail" )
excatly like that. Shouldn't the values echo as what should be inserted into
the database?
- Original Message -
From: "Stephen Johnson" <[EMAIL PROTECTED]>
My first thought is that your values in your insert statement are not in
quotes..
>
> $insert = 'INSERT INTO domains ( picture, thumbnail ) values(
> $picture, $thumbnail )';
Should be
$insert = 'INSERT INTO domains ( picture, thumbnail ) values( "$picture",
"$thumbnail")';
Hope that
thank you. That appears to have solved it.
- Original Message -
From: Santiago Zarate
To: Alexander
Sent: Saturday, January 27, 2007 7:26 PM
Subject: Re: [PHP-DB] I can't solve the error in the code
if(!input) { // an error here... should be !$input or even
if(!
I'm writing a script for uploading into a database urls for a picture and its
thumbnail, but for some reason when I test it out the page doesn't load, and
not even the errors appear. Please help, here's the code:
Enter url of large picture:
Enter url of thumbnail:
11 matches
Mail list logo