php-windows Digest 15 Sep 2012 16:26:27 -0000 Issue 4067

Topics (messages 30949 through 30949):

Php doesn't calculate value
        30949 by: Matt Matt

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
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

--- End Message ---

Reply via email to