Jump to content

Search the Community

Showing results for tags 'radio button issue'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. beginner errors issue for me

    ok so i started off with a radio button well two radio buttons to be exact, and i keep on having this issue but i check to make sure i didnt misspelled anything and so on but i still getting this same problem, also when i click on the one of the radio buttons it works heres the error Notice: Undefined index: position in D:\wamp\www\Website\admin\testing.php on line 65 and this is the code for the above issue if(isset($_POST['submit'])){ // define the variables $Title = $_POST['title']; $Detail = $_POST['description']; $Position = $_POST['position']; echo $Position; // define the error too $errors = array(); // now sanitized please $Title = strip_tags(trim($Title)); $Detail = strip_tags(trim($Detail)); $Title = preg_match("/^[a-zA-Z0-9]*$/", $Title); $Detail = preg_match("/^[a-zA-Z0-9]*$/", $Detail); // now lets see if its empty if(empty($Title) && empty($Detail) && empty($Position)){ $errors[] = 'All Fields Are Required'; } foreach($errors as $error){ echo $error; } } echo '<form action="testing.php" method="POST" enctype="multipart/form-data"> <input type="text" name="title" value=""> <textarea name="description" col="8" row="24"></textarea> <input type="radio" name="position" value="a">Main Position <input type="radio" name="position" value="b">Second Position <input type="submit" name="submit" value="Save"> </form>'; any tip or advice on this one?
×