Jump to content

dinamic "textboxes"?


fdelval

Recommended Posts

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???

Link to comment
https://forums.phpfreaks.com/topic/177758-dinamic-textboxes/
Share on other sites

lets take a look at the picture

phpfm.jpg

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"

Link to comment
https://forums.phpfreaks.com/topic/177758-dinamic-textboxes/#findComment-937302
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/177758-dinamic-textboxes/#findComment-937307
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/177758-dinamic-textboxes/#findComment-937318
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.