mysql - PHP PDO Prepared Insert Query. Problem with value not being passed -


I am using PDO for PHP queries made with MySQL. The query executes with no errors but a parameter does not pass it correctly. It comes in the form of an empty area, but not zero it is really strange because it appears that I have entered the code as other people who certainly do the right things. Really disappointing

  $ f_name = $ _POST ['f_name']; $ L_name = $ _POST ['l_name']; $ Email = $ _POST ['Email']; $ Pass = $ _POST ['pass']; $ Address1 = $ _POST ['address']]; $ Address2 = $ _POST ['address_2']; $ Suburban = $ _POST ['suburb']; $ City = $ _POST ['city']; $ Country = $ _POST ['country']; $ Phone = $ _POST ['phone']; ('Db_connect.php'); $ Stmt = $ db_connection- & gt; INSERT value (NULL,: f_name,: l_name,: email,: pass, address 1, suburb, '' in user INID, FName, lName, email, password, address, lean 1, suburb, city, country, City, country :: phone) '); $ Stmt- & gt; Bindamaram (': f_name', $ f_name, pdo :: param_ast); $ Stmt- & gt; Bind Parm (': l_name', $ l_name, PDO :: param_st); $ Stmt- & gt; Baidamaram (': email', $ email, pdo :: param_st); $ Stmt- & gt; Beyond Parm (': Pass', $ pass, PDO :: param_ast); $ Stmt- & gt; Dandruff (': Address1', $ Address1, PDO :: Param_st); // $ stmt-> Bindam Parm (': Address2', $ Address2, PDO :: Param_st); $ Stmt- & gt; Beyond Parm (': Suburb', $ Suburb, PDO :: Param_st); $ Stmt- & gt; Beyond Parm (': City', $ City, PDO :: Param_st); $ Stmt- & gt; Beyond Parm (': Country', $ Country, PDO :: Param_st); $ Stmt- & gt; Bindamaram (': phone', $ phone, PDO :: param_ast); {$ Stmt-> carry about (); Print_r ($ stmt); $ Result = $ stmt-> Fatch ALL (); } Hold (exception $ E) {echo $ e; }  

output of print_r ($ _ POST); Is: [[e-mail] => test@test.com [pass] => pass [pass_confirm] => pass [f_name] => ff [al_name] => sfasafs [address_1] => sfafsa [address_2] = > Dsfsafsaf [Suburb] => dffdsa [city] => dsffdf [country] => sfaafdsa [phone] => fsaafssaf [submit] => register)

The problem is that the database with a new record Populated but password field is empty I have removed hashing to make things easier.

Here the user has a SQL table:

  If no tab is turned on, then `Tuberuser '(` UserID' int (11) does not tap AUTONCERTment, 'password' 'Varkar' (30) default faucet, 'velcra 2' varchar (30) default faucet, suburb 'varchar (30), default null', 'varta' (30) `Varchar '(30) default faucet,` f' name 'varchar (30) default faucet, `l name' varchar (30), 'varchar' (30) default null,` phone 'varchar (25) Zero, 'business Default '0', primary key (`user ID '), unique key' email '(` email`), unique key' email '(`email`)) engine = InnoDB is not the default charset = Latin1 AUTO_INCREMENT = 10;    

You do not define $ pass Db_connect.php Do you have any chance? If you do, then it will overwrite your original announcement.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -