Thanks All.

Made the changes and just like Ambien it worked like a Dream.

I found out that I had a typo in my DB and missing ")" I corrected it. All
is well.


"Tijnema" < wrote in message
news:[EMAIL PROTECTED]
> On 6/3/07, Stut <[EMAIL PROTECTED]> wrote:
>> K. Hayes wrote:
>> > What "lists" are you referring to?  Also this is how the examples show
>> > I've seen.
>>
>> I mean hit "Reply to all" in your mail client. That way you include the
>> email address of the PHP General mailing list so everyone, including the
>> archives, can see your reply.
>>
>> > I know this is basic general stuff but I try many times before posting,
>> > and I have followed all directions given.
>>
>> Change the following line...
>>
>> > mysqli_query($connection,$sql_query); ?>
>>
>> to...
>>
>> mysqli_query($connection,$sql_query)
>>     or die("Query failed: ".mysqli_error($connection);
>
> you're missing a ) here, it should be:
> mysqli_query($connection,$sql_query)
> or die("Query failed: ".mysqli_error($connection))
>
> Tijnema
>>
>> If you still get no output, check error_reporting and display_errors in
>> your php.ini file to make sure you are seeing at least errors and
>> warnings.
>>
>> -Stut
>>
>> > ===========================END NEW
>> > CODE=====================================
>> >
>> >
>> > ----- Original Message ----- From: "Stut" <[EMAIL PROTECTED]>
>> > To: "K.Hayes" <[EMAIL PROTECTED]>
>> > Cc: "php-general" <php-general@lists.php.net>
>> > Sent: Saturday, June 02, 2007 9:52 PM
>> > Subject: Re: [PHP] Cant set info in DB...HELP
>> >
>> >
>> >> Please include the list on all replies.
>> >>
>> >> K.Hayes wrote:
>> >>> I don't know if I'm escaping the 'vars correctly'.  If I'm wrong can
>> >>> you
>> >>> give me an example?
>> >> <snip>
>> >>> $sql_query = "INSERT INTO contestants (conName, conAddress, conCity,
>> >>> conState, conZip, conPhone, schName, schAddress, schCity, schState,
>> >>> schZip,
>> >>> strName, strCity, strState) VALUES('$regName', '$regAddress',
>> >>> '$regCity',
>> >>> '$regState', '$regZip', '$regPhone', '$sclName', '$sclName',
>> >>> '$sclCity',
>> >>> 'sclState', '$sclZip', '$stoName', '$stoCity', '$stoState')";
>> >>> $insert_query = mysqli_real_escape_string($connection, $sql_query);
>> >>>
>> >>> mysqli_query($connection,$insert_query); ?>
>> >>
>> >> No, this is not the right way. I suggest you read the manual page on
>> >> mysqli_real_escape_string (http://php.net/mysqli_real_escape_string).
>> >> You need to run it on every variable you are using *in* the SQL query,
>> >> not on the SQL query itself.
>> >>
>> >> Google for a php mysqli tutorial - all this stuff is very basic and
>> >> should be covered by most tutorials you'll find.
>> >>
>> >> -Stut
>
>>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to