teo6389 Posted May 30, 2011 Share Posted May 30, 2011 Hello to you all!!!!! This is my first post and every opinion/help will be much appreciated by me. I am new to php and javascript. So lets start... What i want to do is parse a variable to an external php form every time a person clicks on text. For example lets assume that i have the following string echoed $test = "what a beautiful day"; i want when a person clicks on "what" the "phpquery?test=what" to be triggered. From what i have read javascript can help with that because of the client side scripting logic Thank you all in advance! Quote Link to comment https://forums.phpfreaks.com/topic/237815-parse-javascript-to-php/ Share on other sites More sharing options...
fugix Posted May 30, 2011 Share Posted May 30, 2011 this can be done several ways....the way i would do it would be to utilize AJAX to send the value to an external php source.. Quote Link to comment https://forums.phpfreaks.com/topic/237815-parse-javascript-to-php/#findComment-1222074 Share on other sites More sharing options...
teo6389 Posted May 30, 2011 Author Share Posted May 30, 2011 this can be done several ways....the way i would do it would be to utilize AJAX to send the value to an external php source.. ok. can you please provide me with an example? Quote Link to comment https://forums.phpfreaks.com/topic/237815-parse-javascript-to-php/#findComment-1222084 Share on other sites More sharing options...
fugix Posted May 30, 2011 Share Posted May 30, 2011 if you are not familiar with AJAX you can use this resource here Quote Link to comment https://forums.phpfreaks.com/topic/237815-parse-javascript-to-php/#findComment-1222086 Share on other sites More sharing options...
teo6389 Posted May 30, 2011 Author Share Posted May 30, 2011 if you are not familiar with AJAX you can use this resource here i did something like that instead <?php $row = mysql_fetch_array($result); $pieces = explode(" ", $row['perigrafi']); $count=sizeof($pieces); for($counter=0;$counter<$count;$counter++){ echo "<dd class=\"greek\"><dfn id=\"1\"></dfn>$pieces[$counter]</dd><a href=\"test.php?url=$url\" class=\"x87\">"; } echo "<br />"; mysql_data_seek($result,0); ?> but the first result doesnt return as hyperlink Quote Link to comment https://forums.phpfreaks.com/topic/237815-parse-javascript-to-php/#findComment-1222347 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.