0

I don't understand why I canot $_POST $row[Oras]. I get UNDEFINED VARIABLE
:

<p><?php
     $qorase="SELECT Oras FROM oras";
    if (isset($qorase) && !empty($qorase)) {  
      echo"<!--" . $qorase . "-->";
          $result = mysql_query($qorase)
       or die ("invalid query 4: " . mysql_error ());}
    
    ?>
             <select name="option" >
    
<?php    while ($row = mysql_fetch_array($result)){
    echo "<option value=\"$row[Oras]\">$row[Oras]</option>\n";

       ;}
?></p>
  </select>
</p>

         
<p><input type='submit' name='send'></p>

WHEN I CALL IT WITH POST IS NOT WORKING

$Oras=$_POST[$row['Oras']];
3
Contributors
3
Replies
10
Views
7 Years
Discussion Span
Last Post by cereal
0

I don't understand why I canot $_POST $row[Oras]. I get UNDEFINED VARIABLE:

<p><?php
     $qorase="SELECT Oras FROM oras";
    if (isset($qorase) && !empty($qorase)) {  
      echo"<!--" . $qorase . "-->";
          $result = mysql_query($qorase)
       or die ("invalid query 4: " . mysql_error ());}

    ?>
             <select name="option" >

<?php    while ($row = mysql_fetch_array($result)){
    echo "<option value=\"$row[Oras]\">$row[Oras]</option>\n";

       ;}
?></p>
  </select>
</p>


<p><input type='submit' name='send'></p>

WHEN I CALL IT WITH POST IS NOT WORKING

$Oras=$_POST[$row['Oras']];

end quote.

PROBLEM SOLVED:
THE PROBLEM WAS WRONG CALL
the answer found is:

$Oras=$POST['option'];

Edited by mike_2000_17: Fixed formatting

0

whenever Your Database is empty at that time you get this error.
Please check your table values.
might be it is empty
if empty then insert value first time manually
i thought it will helpfull to you
because in my case after doing this method my eror are solved ;|)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.