php - Trying to use prepare and bindParam to insert user data into SQL table -
User input is attempting to enter in the MYSQL database. I'm using PHP / SQL: Edit: The code below has solved my problem. I was specifying a method for a non-object Remember the bundle classes are in PDO, MySQL or whatever database, reuse Is doing ... then it should be said in such a way: because the column
email is a unique key to prevent duplication. The name of the table is
launch_email and I
ready < Trying to prevent SQL injection by using / code> and
bindParam , however I get this error:
Call from the undefined function bindParam () Any solution?
is required (ROOT_PATH. "Inc / database.php"); Try {$ Replace = $ db- & gt; Prepare ("launch_change_imail values" ("email_star");); $ Place = binduparm (": email_str", $ email, pdo :: param_st); $ Replace-> Executed (); } Hold (exception $ e) {resonant "data could not be submitted to database."; Go out; }
is required (ROOT_PATH. "inc / database.php"); Try {$ Replace = $ db- & gt; Prepare ("launch_change_imail values" ("email_star");); $ Substitution- & gt; Bindamuram (": email_str", $ email, pdo :: param_st); $ Replace-> Executed (); } Hold (exception $ e) {resonant "data could not be submitted to database."; Go out;
$ replace-> Dandruff (": email_str", $ email, PDO :: PARAM_STR);
Comments
Post a Comment