<span id="abc">MY_Data</span>
I want "MY_Data" as value in a php variable Any help will be greatly appretiated Note this value"MY_Data" is dynamic as it is generated through javascript function Thanks in Advance Swapnil
<span id="abc">MY_Data</span>
I want "MY_Data" as value in a php variable Any help will be greatly appretiated Note this value"MY_Data" is dynamic as it is generated through javascript function Thanks in Advance Swapnil
PHP cannot read html elements. But there are many ways to send data to your php page. Use JavaScript for this ; or if you are using a form, store this value in a hidden field like this :
<input type="hidden" value="MY_Data" name="abc" />
If you do not have a form, but a link, you could also add a parameter to your url, like
<a href="page.php?abc=MY_Data">link</a>
and then retrieve it with $_GET['abc']
.