|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
php5 - Search output for the form in db
hi,
this is my form code i want the out put from db but it is a blank page for me. form.php <html> <body> <table width="100%" border="0" cellspacing="2" cellpadding="1"> <tr> <td align="center"><img src="bannerimages/ADVANCE SERCH.jpg" width="180" height="15" /></td> </tr> <tr> <td> <form name="form3" id="form3" method="post" action="advanced_search.php"> PHP Code:
<tr> <td align="center" > <select name="languages" style="width:150px" class="style1"> PHP Code:
</select> </td> </tr> PHP Code:
<tr> <td align="center" class="style1"> <select name="genres" style="width:150px" class="style1"> PHP Code:
</select> </td> </tr> <tr> <td align="center"><input name="malelead" type="text" class="style1" value="MALE LEAD" size="27" /> </td> </tr> <tr> <td align="center"> <input name= "femalelead" type="text" class="style1" value="FEMALE LEAD" size="27" /> </td> </tr> <tr> <td align="center"><input name="director" type="text" class="style1" value="DIRECTOR" size="27" /> </td> </tr> <tr> <td align="center"><input name="musicdirector" type="text" class="style1" value="MUSIC DIRECTOR" size="27" /> </td> </tr> <tr> <td align="center" ><input name="productionhouse" type="text" class="style1" value="PRODUCTION HOUSE" size="27" /> </td> </tr> <tr> <td align="center"><input name="others" type="text" class="style1" value="OTHERS" size="27" /> </td> </tr> <tr> <td align="center"><input type="image" name="Submit1" src="images/submit-button.jpg"/> </td> </tr> </form> </td> </tr> </table> </body> </html> PHP Code:
|
|
#2
|
|||
|
|||
|
hey
can any one help me out for this. thanku u in advance |
|
#3
|
|||
|
|||
|
I personally wouldn't have a problem helping, but the code in the first post is pretty messed up with all the [php] tags around just the php parts. You should edit that and put the tags around the entire code. As it is I can't test it without doing like 6 copy pastes. Just put everything in one set of tags and then its simpler.
Also, if you put error_reporting(E_ALL) at the top of the script (first line) you would probably see the error you are having. I'm guessing now that its because of the session_start() at the bottom of the page. session_start() generally has to be on the page before any output to the browser including all html. |
|
#4
|
|||
|
|||
|
this is my form
when submited i want the out put from the db PHP Code:
and search.php is PHP Code:
|
|
#5
|
|||
|
|||
|
I didn't really test anything or put it through an IDE to debug, but looking at this line, it could be your problem, what is it supposed to be doing here?:
PHP Code:
maybe you meant: PHP Code:
???
__________________
Sir, a desire of knowledge is the natural feeling of mankind; and every human being, whose mind is not debauched, will be willing to give all that he has to get knowledge. |
|
#6
|
|||
|
|||
|
thanku very much for ur reply,
nothing wrong in $counter the problem lies in sql query. when i use "and' in query i have to enter all the fields in the form IF i use "or" i am not able to get the correct result help me in this way thanking u in advance |
|
#7
|
|||
|
|||
|
I thought you said that it comes up as a blank page? That usually means that's it's erroring out.
Try changing: PHP Code:
|
|
#8
|
|||
|
|||
|
See above, but
Here's an easy way to display errors too, just make another PHP file called: errors.php Make sure it's in the same directory as your 'search.php' and then fill it with this: PHP Code:
if you need to use it will other files, just change: PHP Code:
|
|
#9
|
|||
|
|||
|
no error in display of the output, nut i am not getting the required result,
the error my be in sql query and that too in using "and" or "or" . |
|
#10
|
|||
|
|||
|
I don't understand. Did you try everything that was suggested above?
|
|
#11
|
|||
|
|||
|
if you want to check if there is an error in your query then just echo out mysql_error() after each query. that will display any errors from mysql if there are any.
|
|
#12
|
|||
|
|||
|
i am not able to that, i have tried all these but some where something is going wrong
i need the result from mysql to this form in this form it is not necessary to fill all the fields though we fill one or 2 fields we have to get the output.and all the field are in the single table itself to retrive here is my form PHP Code:
please do the needful thanking u in advance |
|
#13
|
|||
|
|||
|
Hey,
I had the same blank problem when dealing with PHP and SQL. The below solved the problem, I meant the blank page. PHP Code:
Then after clearing the errors I was able to connect and quires worked too. Please explain your questions in detail (even if it takes up lot of space, just don't worry ) and clear way, then only they can help you figure out, what the problem is. |
|
#14
|
|||
|
|||
|
this is my code of search form
and i need the out put from database as the thumbnails, when they select any of the fields or all the fields. and in this form o have taken the language and genres fields from the database as the dropdown box, the result must be the thumbnail only selected from the fields and the user may select all the fields or one or two fields. PHP Code:
<tr> <td align="center" > <select name="languages" style="width:150px" class="style1"> PHP Code:
</select> </td> </tr> PHP Code:
<tr> <td align="center" class="style1"> <select name="genres" style="width:150px" class="style1"> PHP Code:
</select> </td> </tr> <tr> <td align="center"><input name="malelead" type="text" class="style1" value="MALE LEAD" size="27" /> </td> </tr> <tr> <td align="center"> <input name= "femalelead" type="text" class="style1" value="FEMALE LEAD" size="27" /> </td> </tr> <tr> <td align="center"><input name="director" type="text" class="style1" value="DIRECTOR" size="27" /> </td> </tr> <tr> <td align="center"><input name="musicdirector" type="text" class="style1" value="MUSIC DIRECTOR" size="27" /> </td> </tr> <tr> <td align="center" ><input name="productionhouse" type="text" class="style1" value="PRODUCTION HOUSE" size="27" /> </td> </tr> <tr> <td align="center"><input name="others" type="text" class="style1" value="OTHERS" size="27" /> </td> </tr> <tr> <td align="center"><input type="image" name="Submit1" src="images/submit-button.jpg"/> </td> </tr> </form> </td> </tr> </table> and the code for search.php PHP Code:
this is my clear code please help me to do this and it is very urgent also, thanku for one and all for the suggestions. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > php5 - Search output for the form in db |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|