Jump to content

echo href id


simzam

Recommended Posts

no actually I'm try to get DIV content to input field when clicked on it

i think we need to use some JavaScript here donno how to please help to do

when i click EDIT button it should send text to input filed or <textarea>

 

if (isset($_GET['edit']) && $_GET['edit'] == 'textupdate') {
here i put input filed or <textarea>  that contain text content of div 
}

 

echo  " <div id=\"edit{$row['id']}\"> {$row['title']} </div> <a href= \"{$_SERVER['PHP_SELF']}?edit=textupdate\" id=\"edit{$row['id']}\" >Edit</a><br><br>\n" ;

Link to comment
https://forums.phpfreaks.com/topic/222482-echo-href-id/#findComment-1150742
Share on other sites

From where do you get the value you want to edit?

Database? To get the value from your database table you need a query. As soon as you get the value just do this:

 

<textarea><?php echo $value_from_database; ?></textarea>

 

That will show the variable as the text in the text area

Link to comment
https://forums.phpfreaks.com/topic/222482-echo-href-id/#findComment-1151147
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.