Jump to content

EddNicks

New Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

EddNicks's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello All, I am really struggling with embedding a Google calendar for the month after this month. I have embedded a calendar onto a php page for this month but i would like to also have one showing next month. Hopefully i have made sense and someone could offer me some advise. I presume i will need to edit the URL to something differnet to show the next month. Here is my current URL. <iframe src="https://www.google.com/calendar/embed?src=**LINK**_oafebdkovh3ifbr9b8clbmergs%40group.calendar.google.com&ctz=Europe/London";
  2. Thanks scootstah .. Would the rest of the coding be correct??
  3. hello, I have worked out the issue.... The automated password generator i have puts a space at the end of it... $randomgen = mt_rand() . "\n"; echo mt_rand(10); I presume i may need to remove the "\n" ??
  4. So would the adults submit work something like this??? Obviously i will have to but a few lines in to connect to the DB but.. I have added a random number generator for now to make the transaction Number... $randomgen = mt_rand() . "\n"; echo mt_rand(10); $transaction_no = "$randomgen"; $numAdults = $_POST['adults']; $numKids = $_POST['kids']; if ($numAdults != 0) { for ($i = 0; $i < $numAdults; $i++) { // create an adult ticket mysqli_query($connect,"INSERT INTO tickets (ticket_type, transaction_no) VALUES ('$i','$transaction_no')"); } }
  5. Yes thats correct.. I will look at tying all the tickets together with a transaction id number or the payment email address that will be the same for all the tickets bought in that transaction. Then when a customer is logged into the online system they can see all of their tickets....
  6. Here is my html form that posts to my submit.php <table width="396" border="0"> <form action="submit.php" method="post"> <tr> <td width="44"> </td> <td colspan="2"><center><h2>A Bit About You..</h2></center></td> <td width="58"> </td> </tr> <tr> <td> </td> <td width="107"><p>Forename: </p></td> <td width="159"><input type="text" name="firstname" required></td> <td> </td> </tr> <tr> <td> </td> <td>Surname:</td> <td><input type="text" name="secondname" required></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><center><h2>How Do We Get In Touch?</h2></center></td> <td></td> </tr> <tr> <td> </td> <td>Email Address:</td> <td><input type="text" name="email" required></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><p><center><h2>When Are You Visiting?</h2></center></p></td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"> <center> <select name="dayattending"> <option value="Saturday 16th">Saturday 16th</option> <option value="Sunday 17th">Sunday 17th</option> </select></center></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><center><h2>Who's Coming?</h2></center></td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><center>Early Bird Discount <br /> Adult Ticket £2.50 <br /> Childrens Ticket (age 3-15) £0.50 <br /> Family Pass : £6.00 <br /><br /> </center></td> <td> </td> </tr> <tr> <td> </td> <td><center>Adult Ticket</center></td> <td><center>Childrens Ticket (age 3-15)</center></td> <td> </td> </tr> <tr> <td> </td> <td><center><input type="text" size = "2" name="adults" value="0"></center></td> <td><center><input type="text" size = "2" name="kids" value="0"></center></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><center>Family Ticket (2 Adults & 2 Children)</center></td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><center><input type="text" size = "2" name="family" value="0"></center></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"><center><input type="submit"></center></td> <td> </td> </tr> </table> I am finding it really hard to get my head around the arrays as i have never used them before. If someone can give me an example i can try to build. I want to input each ticket as a single post in a MYSQL table so they can have their own booking number, which i will convert into a barcode to the public can be scanner in to the venue...
  7. After reading many tutorials i really have no clue where to start on this... Could anyone lend me a hand??
  8. Hello, I have been coding little bits and bobs for a little while now. But i have come across a problem that i can't think how i can solve it. I have a login system form a tutorial online but i would like the use to be able to login with an email address instead of a username. I have managed to get this to work with a basic email like... edd@edd.com, but when i have an email will numbers (e.g. edd123@edd.com) then the login system will not work. I am sure that i have seen some sort of code that stops the input field from affecting the search to MYSQL. Here is my code... <? session_start(); ?> <html> <head> <title>Login</title> </head> <body> <?php if (!isset($_POST['submit'])){ ?> <!-- The HTML login form --> <center> <br /><br /><br /><br /> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> Email: <br /> <input type="text" name="username" /><br /><br /> Password: <br /> <input type="password" name="password" /><br /> <input type="submit" name="submit" value="Login" /> </form> </center> <?php } else { require_once("db_const.php"); $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); # check connection if ($mysqli->connect_errno) { echo "<p>MySQL error no {$mysqli->connect_errno} : {$mysqli->connect_error}</p>"; exit(); } $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT * from traders WHERE pemail LIKE '{$username}' AND password LIKE '{$password}' LIMIT 1"; $result = $mysqli->query($sql); if (!$result->num_rows == 1) { echo "<p>Invalid email/password combination</p>"; } else { $_SESSION['useremail'] = $username; echo $_SESSION['useremail']; echo("<h1>Welcome To The TAW Bunker</h1>"); echo "<p>Logged in successfully</p>"; // do stuffs } } ?> </body> </html>
×
×
  • 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.