Jump to content

Search the Community

Showing results for tags 'tickets'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Struggling with creating the following: a. The authorized user can select one or both of the two available lottery services (in form of checkboxes) provided by your website. Generate six sets of LOTTO 6/49 numbers (sorted in ascending order) when option one, labeled as “LOTTO 6/49”, is checked. One set of “LOTTO 6/49” numbers consists of 6 unique numbers between 1 and 49 inclusively. Generate six sets of LOTTO MAX numbers (sorted in ascending order) when option two, labeled as “LOTTO MAX”, is checked. One set of “LOTTO MAX” numbers consists of 7 unique numbers between 1 and 49 inclusively. b. When the authorized user submits the form with one or both of the two available services checked, your web server will generate six sets of lottery numbers for each type accordingly and display these numbers of each type of lotteries to the user. Code so far: <?php error_reporting(E_ALL | E_NOTICE); ini_set('display_errors','1'); if(!isset($_SESSION)){ session_start(); } ?> <html> <head> <title> Choose Tickets</title> </head> <body> <h2> Choose your tickets</h2> <?php if (filter_input(INPUT_POST,'form_tickets')){ if(!empty($_SESSION["tickets"])){ $tickets = array_unique( array_merge(unserialize($_SESSION["tickets"]), filter_input(INPUT_POST, 'form_tickets'))); $_SESSION["tickets"] = serialize($tickets); } else { $_SESSION["tickets"] = serialize(filter_input(INPUT_POST, 'form_tickets')); } echo "<p> Your tickets have been selected!</p>"; } ?> <form method="POST" action=""> <p><strong>Select your ticket(s):</strong><br> Lotto 6/49: <input type="checkbox" value="Lotto 6/49"><br /> Lotto Max: <input type="checkbox" value="Lotto Max"><br /> <p><input type="submit" value="submit"/></p> </form> </body> </html> I honestly don't really know what I'm doing.. This class isn't specifically php so he's going through it too quick for me to grasp/learn. I'm sort of going off examples he's given us but I can't seem to fit the pieces together to make this thing. Again, any help is greatly appreciated I have a vague idea of how it's all supposed to work but not sure of the commands to do it or how to structure it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.