Re: [PHP-DB] Re: [PHP] A prepared statements question

2009-07-12 Thread Jason Carson
>> >> [Redirected to PHP-DB: php...@lists.php.net] >> >> >> On Sun, Jul 12, 2009 at 00:31, Jason Carson wrote: >> > Hello everyone, >> > >> > I am having a problem getting my prepared statements working. Here is >> my >&g

[PHP-DB] MySQLand a prepared statement problem

2009-07-16 Thread Jason Carson
Hello everyone, I have a problem. When I insert http://example.com>Example into my database with the following code... $connect = mysqli_connect($hostname, $username, $password, $database); $sql="INSERT INTO notes VALUES ('$id', '$note')"; $result=mysqli_query($connect, $sql); ...everything work

Re: [PHP-DB] MySQLand a prepared statement problem

2009-07-16 Thread Jason Carson
> Hello everyone, > > I have a problem. When I insert http://example.com>Example > into my database with the following code... > > $connect = mysqli_connect($hostname, $username, $password, $database); > $sql="INSERT INTO notes VALUES ('$id', '$note')"; > $result=mysqli_query($connect, $sql); > > .

Re: [PHP-DB] MySQLand a prepared statement problem

2009-07-16 Thread Jason Carson
I was under the impression that using prepared statements means you don't need to use those functions. > check into stripslashes ,addslashes and mysqli_real_escape_string > functions. > > Jack > > 2009/7/17 Jason Carson > >> > Hello everyone, >> >

Re: [PHP-DB] MySQLand a prepared statement problem

2009-07-16 Thread Jason Carson
I solved the problem by turning off magic_quotes_gpc in my php.ini file. > I was under the impression that using prepared statements means you don't > need to use those functions. > >> check into stripslashes ,addslashes and mysqli_real_escape_string >> functions. >&g

[PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Jason Carson
Hello everyone, I have a problem. I use the following to *try* and insert data into my MySQL database... //Variables come from a form $username= $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; //Connect to the database $connect = mysqli_connect("$hostname", "$dbuse

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Jason Carson
could be rewritten as: > mysqli_stmt_bind_param($submitadmin, "isss", $numrows, $admin, > sha1($password), $email); > > On Tue, Jul 21, 2009 at 8:01 PM, Jason Carson > wrote: > >> Hello everyone, I have a problem. >> >> I use the following to *try* and inser

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Jason Carson
Done. Thanks for letting me know about that. > kesavan trichy rengarajan wrote: > > > could be rewritten as: > > mysqli_stmt_bind_param($submitadmin, "isss", $numrows, $admin, > > sha1($password), $email); > > Turning on E_STRICT in PHP 5.3 will show > >PHP Strict Standards: Only variable