I'm new to php but with my some knowledge i'm hv coded to access result from other website.
i'm trying to create educational website where students results r fetched from one of the university
i'm able to fetch result when students enter their reg no in form(eg:1db12cs005) but the problem is i'm willing to give 2 option for user to choose either one of the choice but each link follows to some link [(1) http://results.vtu.ac.in/vitavi.php 2) http://results.vtu.ac.in/vitavireval.php ] the below code is fetching result from by only one link http://results.vtu.ac.in/vitavi.php but how can i had choice to have 2 choice.(i dont hv choice option code plz help me)
PHP Code:
<?php
echo '<form name="new" action="vitavi.php" method="POST">
 <p>Enter the University Seat No: <input type="TEXT" name="rid" size="20" maxlength="50"><br><br><br><br>
 <input type="SUBMIT" name="submit" value="SUBMIT" align="center"><br></p>
<form>'
;
if(isset(
$_POST['submit']) && isset($_POST['rid']) && !empty($_POST['rid']))
{
    
$location 'http://results.vtu.ac.in/vitavi.php';
    
$userAgent 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)';
    
$ch curl_init();
    
curl_setopt($chCURLOPT_HEADER0);
    
curl_setopt($chCURLOPT_VERBOSE0);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_USERAGENT$userAgent);
    
curl_setopt($chCURLOPT_POST1);
    
curl_setopt($chCURLOPT_URL$location );
    
$post_array = array(
        
"rid" => $_POST['rid'],
        
"submit" => "SUBMIT"
    
);
    
curl_setopt($chCURLOPT_POSTFIELDS$post_array); 
    
$response curl_exec($ch);
    
$extract = array("start" =>'<TD width="513">'"end"=>'<b>REGISTRAR(EVALUATION)</b>');
    
$start stripos($response$extract['start']);
    
$end stripos($response$extract['end']);
    
$response substr($response$start$end);
    echo 
$response."<br/>";
    
$start '<TD width="513">';
    
$end '<br>';
    
$response strstr($response$start);
    
$end stripos($response$end);
    
$response substr($responsestrlen($start), $end strlen($start));
    echo 
$response."<br/>";
}  
?>
thank u