|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
i've got a little problem with EditWorksPro. I'm trying to get data out of a MySQL database, edit it, and put it back in.
Well so far so good. With the help files i’ve got it done. BUT... i use this as navigation: PHP Code:
well this is the script i'm talking about PHP Code:
if I put for example ' where id = 2' everything works fine. He opens the page with ?id=2 and saves it the right way. But when i put ' where id = '$id' . He won't save correctly although he does read the right page. So he does open the page with the correct id...... But he looses his identity halfway through. i'm confused ![]() |
|
#2
|
|||
|
|||
|
hey, I'm not sure if this will make a difference, but at first glance, if the $id is a integer in the database, I think you could try removing the ' ' quotes around the $id....
so it would be PHP Code:
|
|
#3
|
|||
|
|||
|
nop
still nothing happens ![]() |
|
#4
|
||||
|
||||
|
Question for you Lizzy, where are you declaring $id ? are you passing it through to the script via URL? I don't see it in the script.. try adding this code in and see if it helps..
PHP Code:
Just a thought.. I didn't see where you were declaring it anywhere in the code ![]() Hope it helps |
|
#5
|
|||
|
|||
|
IT WORKSSSSSSSSSSSSS!!!!!
i'm so happy! i'm so blond and/or female well blond i am not so it has to be the female part ![]() i just had to put the $id in the url in the form <form action="test.php?id=<? echo($id) ?>" method="post"> duhh * feels stupid but also very very happy thanx for your input now i can go to sleep without dreaming php ![]() |
|
#6
|
||||
|
||||
|
No worries
I'm glad I could help ya out! Sometimes it just takes someone who doesn't have as much experience as everyone else <namely myself! though I am coming up in the PHP world > to look at it from another perspective.. sometimes it's an easy answer that is just staring at you, sometimes it's a toughie.. either way.. as long as it gets resolvedGlad to be of assistance ![]() |
|
#7
|
|||
|
|||
|
$_REQUEST["var_name"]
FYI as opposed to checking both $_GET & $_POST you can just use $_REQUEST["var_name"], which will access get and post vars automatically
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > WYSIWYG - Can read, can't write to db. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|