fdelval Posted October 15, 2009 Share Posted October 15, 2009 Ey all, my first post here, i hope its not a hard one I display mysql results in a table Each row has a link which must send the title of the row to "result.php" EXAMPLE TITLE------------UNITS book--------------10 - - link video-------------10 - - link audio-------------10 - - link pencils------------10 - - link Now, i want to put a kind of textbox under each row, so the user can type the cuantity of units to order EXAMPLE TITLE------------UNITS book---------------10 - - link -------------------[ ] - - link video--------------10 - - link -------------------[ ] - - link audio--------------10 - - link -------------------[ ] - - link pencils-------------10 - - link -------------------[ ] - - link this is the code of the link <a href='result.php?ref=$modelo&xxxxxxxxxxxx='>LINK</a> xxxxxxxxxxx is the code im lacking to send the content of the "textbox" i dont know how to use... is this possible? any other workaround??? Quote Link to comment Share on other sites More sharing options...
lszanto Posted October 15, 2009 Share Posted October 15, 2009 I don't understand what you are asking, can you phrase it more clearly or give a better example? And from the looks of it without really understanding it looks like this is more a javascript problem than php. Quote Link to comment Share on other sites More sharing options...
fdelval Posted October 15, 2009 Author Share Posted October 15, 2009 lets take a look at the picture First line are the tittles of the table Second line are the codes of the product retrieved from mysql database Third line are; 1)the link: <a href='result.php?ref=$modelo&accion=ver&1t1=xxxxxxxxxxxxxxx'> where xxxxxxxxxx is the code i need 2) a textbox, where the user can type the amount of items to order that link pass the model, the color, and the amount of items to buy BUT i dont know how can i pass the input data typed in that "textbox" Quote Link to comment Share on other sites More sharing options...
lszanto Posted October 15, 2009 Share Posted October 15, 2009 Well you could do it with javascript but my suggestion is to make it into a form which has method="get" action="result.php?ref=$modelo&accion=var" and then just put the box as an input box in the form with the name 1t1 and it will be submitted on the url as you requested. Does that work for you/answer your question? Quote Link to comment Share on other sites More sharing options...
fdelval Posted October 15, 2009 Author Share Posted October 15, 2009 Well you could do it with javascript but my suggestion is to make it into a form which has method="get" action="result.php?ref=$modelo&accion=var" and then just put the box as an input box in the form with the name 1t1 and it will be submitted on the url as you requested. Does that work for you/answer your question? im gonna implement it but i have my doubs the table gets the data from the mysqlquery in a WHILE while(){ fill up table } so i guess i must put the form this way? <form> while(){ fill up table <input=text> } </form> ??? also, this way, the data will be sent with a button, right??? no way to use my own hyperlink? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.