ok, i read this, and i'm gonna atempt to answer it the best that I can from my understandinf of what you are saying..
for example the var name of the textbox for this url is "P2" => this is column ID 2 in my mysql table and should allow me to update the right url if the user updates this url. If he now ADD's a new URL the value of the textbox will be "P3" and so on.
My prob is that I don't know how many urls the user already added so I cannot enter this var names in PHP!
so normaly you would go for a simple:
I'm assuming that you are saying you have a table, and within this table is a field that contains P1, P2, P3, etc, meaning it inc's every time a user adds a URL. So, why not just do a "Select count(field_in_question) from mytable where user = 'User_that_submitted'"; ?
that way, you can get how many times they have submitted urls..
now, this block of code, i'm not sure what you are wanting to do with it... i have no idea what this is suposed to stand for, so i dunno if it's useful or not. If you are parsing the table based on what the user chooses with this, and want to get a count, then the same reasoning goes for the query i gave you above.
And then update P2 into your table.
But here I cannot enter this in my PHP code as P2 is created dinamicaly dependant of the input of the user.
yes you can. just $myvar = $_POST['p2'];
then a simple query to insert $myvar into mysql would be in order .
So is it possible to update vars in mysql from php if their name is not nown when creating the code.
hope this was not just more confusiing
thx
siech
i'm not sure what you are saying here. are you asking if it's possible to update to a table when you are unsure what the fields are? if so, no. you have to know what fields to insert into a table before you can add it.
or are you asking if it's possible to update a table with values from a variable without knowing what values they are submitting? this would be yes, though i don't know why you would want to. the reason for tables is to sort data and make it easier to search for, so if you have no idea what content is gonna be in that table, what's the use of saving it?
dunno, i'm sorry that you don't speak english very well as you sound like you know what youa re doing with php, it's just trying to decypher your problem into readable english that is hampering our ability to help you out
hope that helped in some way. otherwise, just keep trying and eventually we'll get what you are trying to say, and possibly even solve the problem for ya
