Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Alexander
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

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Niel Archer
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

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Alexander
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

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Alexander
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?

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Niel Archer
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

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Stephen Johnson
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 */ ?>

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Alexander
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

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Alexander
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]>

Re: [PHP-DB] Am I missing something?

2007-01-27 Thread Stephen Johnson
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

Re: [PHP-DB] I can't solve the error in the code

2007-01-27 Thread Alexander
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(!

[PHP-DB] I can't solve the error in the code

2007-01-27 Thread Alexander
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: