0

I am working on a site php the site have a quiz section the quiz section contain 50 question and every question have the four options we need to put any option in submit box .....i made its php but dont get success

it is my php that i creat preg_match('/Question no:(.*?)

if(preg_match('/input type=\"text\" name=\"(.*)\" id=\"(.*)\"  value=\"Type your answer here\" style=\"border:0 none;\"/i',$dt,$n)) 
$ans_field = $n[1]; 

$post_data3 = "qxci=$qxci";
curl_setopt($ch, CURLOPT_URL,"hhttp://www.faasty.com/quiz.php");
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data3);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$at = curl_exec($ch);

now the problem is the question and option of this site are in not text format its in image src form suppose that

question is 
"""Goal attack" and "Wing defence" are positions in which sport?""
it have below image src 

    <p><img src="http://www.faasty.com/Views/fiJOvNRrVW.php?iaodifu=1730" height="200" width="379"/></p>

and for the question the four option are

a cricket

    <p class='q_bg1_qq fl'>
   <img src="http://www.faasty.com/unsanswerit.php?iaodifu=1"/></p>

b.baseball
<p class='q_bg1_qq fr'>
<img src="http://www.faasty.com/unsanswerit.php?iaodifu=1"/></p>

cgolf

<p class='q_bg1_qq f2'>
<img src="http://www.faasty.com/unsanswerit.php?iaodifu=1"/></p>

d betminton
<p class='q_bg1_qq fr'>
<img src="http://www.faasty.com/unsanswerit.php?iaodifu=1"/></p>

now source code of input is

    <input type="text" name="zQnBWllwYI" id="zQnBWllwYI"  value="Type your answer here"  style="display:none;" onBlur="javascript:FillValueOnBlur('zQnBWllwYI','Type your answer here');" onFocus="javascript:FillValueOnFocus('zQnBWllwYI','Type your answer here');" class="inpt_qq fl">

and submit box source is

<div class="comman_btn m_none fl"><a href="javascript:void(0)" onclick = "javascript:ScrollUp(70);CHECKFORM_METHOD();">Submit</a></div>

Now please tell me how to fill option in submit box with php

0 Answers0