hello

ok i am not ecately sure if it can be doen or not but here goes

this is the code i have

<form action="<?php $SERVER['PHP_SELF'] ?>" method="post">
Show Name: <input type="text" name="showname"><br><br>
<input type="Submit" value = "View"></center>
<?php
$showname=$
POST['showname'];

....

?>

due to the fact i have the form page within the view page since nothing has been submit at the point the page loads i get this error

Notice: Undefined index: showname in c:\program files\easyphp1-7\www\digitaltv\showsview.php on line 7

is there anyway to set the showname to blank so it does not think the index is undefined but i rather not set it as a value as then it come up with no records found do to the next bit of code after the bit i have displayed here

    Try to use [man]isset[/man]:

    if (isset($_POST['something']))
    {
        do lots of things
    }
    else
    {
        form not submitted, do nothing
    }
    
      Write a Reply...