Jump to content

Like comparison from form difficulty


Tokugawa

Recommended Posts

Hi guys.

 

I have tried implementing PDO in my php. Basically, I have created a form, which will take a letter, and then pass it to the php file.

 

My hope was, whatever was entered by the user, whether that was in the guise of being manually entered by them or chosen by a dropbox etc, this would then be able to be used within the LIKE comparison. When I run my file however, I get the following message:

Error: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound.

I am a little confused by this. I have used $_POST with the HTML form element, and have specified it in the SQL syntax. Can anyone please advise me as to where I am going wrong? 

Link to comment
Share on other sites

Show us the code for:

1 - your sql statement itself

2  - the code that 'binds' or assigns the values/vars to the parms being used in the sql statement  There should be an equal number of values and parms in this code.

3 - the execute

Link to comment
Share on other sites

Actually,  I did. Realising it had nothing to do with my first post, I then edited it. Please don't make baseless accusations, thanks. And not only did I manage to solve my original problem myself, I was able to add additional features. 

Link to comment
Share on other sites

Im confused. my second post was posted 52 minutes ago. Your response was then posted 33 minutes ago, meaning that there was a 21 minute delay, rendering your claim that I deleted my post after you posted null. I asked a secondary issue, then removed it. Realising that it was not permissible to have an entirely empty post, I then posted the comment:"Tired, will post later". By post later, I meant my final, working solution with the additional content I have inserted. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.