Php doesn't calculate value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

i have a problem with a value that it is not passed as POST variable from a
php page to another.
this is the error i have encountered :

*Notice*: Undefined index: idschema in *....\SubmitSchema.php* on line *22*

Follow the code of the main page :
-----------------------
<?php
$c = oci_connect("system", "oramanager", "//localhost/XE");
if (!$c) {
   $m = oci_error();
   echo $m['message'], "\n";
   exit;
}
else {
   print "Connesso!";
}
$s = oci_parse($c, 'select username from dba_users');
oci_execute($s);
print '<center>';
print '<h2>Seleziona lo schema desiderato</h2>';
print '<form name="SelezioneSchema" action="SubmitSchema.php" method=get>';
print '<br>';
print '<select name="selezioneSchema" id="idschema">';
while ($row = oci_fetch_array($s, OCI_NUM+OCI_RETURN_NULLS)) {
    foreach ($row as $item)
        print '<option value="opzione1">'.htmlentities($item).'</option>';
}

print '</select>';
print '<input type=submit value="Invia">';
print '</form>';
//print 'Valore id_schema'.$idschema;

oci_free_statement($s);

oci_close($c);
?>
-------------------------


and this is the code of the SubmitSchema php page:



---------------------------------------------
<?php


if ( isset($_POST['idschema']) ) {
   echo "setted";}

   else
   {
   echo "not setted";
}
$query = $_POST['idschema'];
print $query;

?>
-------------------------------


I cannot retrieve the value being selected by the user with the dropdown
list, do you have any idea or workarounds?Thankyou!

regards

Matt

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux