Note that there are some explanatory texts on larger screens.

plurals
  1. POMake PHP Click Link On Same PAge Or Process A Form
    text
    copied!<p>Is there any php code i can use to click a link or process a form on the page the php is on?</p> <p>Im building a redirect script and what i need to do is use php to move user to next page, its mandatory that php has to be used html doesnt work. In it i have a self submit forum but it doesnt work how i load the script. Is there a way i can use php code to submit it? or remove it and put a link there then use php to click that link?</p> <p>This is the code below:</p> <pre><code>if ($_GET['ref_spoof'] != NULL) { $offer = urldecode($_GET['ref_spoof']); $p1 = strpos ($offer, '?') + 1; $url_par = substr ($offer , $p1); $paryval = split ('&amp;', $url_par); $p = array(); foreach ($paryval as $value) { $p[] = split ('=',$value); } //header('Location: '.$offer.'') ; print ' &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;/head&gt; &lt;body&gt; &lt;script src="http://code.jquery.com/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;$("#mylink").click()&lt;/script&gt; &lt;a href="'.$offer.'" id="mylink"&gt;Index Page&lt;/a&gt; &lt;script type="text/javascript"&gt;$("#mylink").click()&lt;/script&gt; &lt;script type="text/javascript"&gt;document.getElementById("myLink").click();&lt;/script&gt; &lt;form action="'.$offer.'" method="get" id="myform"&gt; '; foreach ($p as $value) { echo '&lt;input type="hidden" name="'.$value[0].'" value="'.$value[1].'"&gt;'; } echo '&lt;/form&gt;&lt;script language="JavaScript"&gt; document.getElementById(\'myform\').submit();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;'; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload