Jump to content

FriskyDingo

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by FriskyDingo

  1. Thank you all I got it to work. Took a little longer than I thought but your advice certainly pointed me in the right direction. I have a year to redo this code after this week and look forward to the challenge. Had some more issues with older commands and realize that if I am going to help out and I have a lot of freedom I should get it working for now and then update it during the 11 months it isn't used. Thanks again. Great site, great community. Hopefully over time and experience I can help someone else out down the line.
  2. Wow! I don't know who to respond to first. I realize the code is old, I am going to start updated it in a couple of weeks but I need to get this working in 4 days. After reading all the responses here is where I am. Here is where I have the INSERT INTO command. How do I take that information and display it on the success page. Here is that submit code. Not being lazy, I am so new to this that I have realized that this page needs to be completely redone. mysql_select_db($Database, $con); $sql = 'INSERT INTO applicants (FirstName, SecondName,DOB, SEmail) '; $sql .= "VALUES ('$FirstName', '$SecondName','$DOB', '$SEmail')"; mysql_query($sql, $con); mysql_close($con); header('Location: success.php') ; } } ?> I appreciate the links to the php sites, I see I have a lot to read and practice before I redo this code. Thanks again for all your help so far.
  3. Hello, Thank you for the response. I see what you mean by a race if 10 people submit at once I am screwed. So any ideas on how to do the capture on the submit page and post it on a success page? Thanks again for this quick response. I really appreciate it. The word last was to capture the last entry but your race condition isn't what I want. Another option would that as a confirmation they receive an email instead of the success page that would include the information they entered and the auto incremented id they get when entered into the database. I have code, let me know what I can send that would help. Thank you for editing the post, new to the site but not online forums ... been a long day.
  4. Good afternoon, I was wondering if you could help me out with a few things. I have created a registration page and it stores the information into my database. A success page then appears with some of the details they entered as a confirmation page. Unfortunately I cannot get the information to appear on the page. I have included some code, any help would be greatly appreciated. <?php $Username = "db1234"; $Password = "fakepassword"; $Database = "db2015"; $con = mysql_connect("other information here", $Username, $Password); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($Database, $con); $sql = 'SELECT LAST(FirstName) FROM Applicants'; $result = mysql_query($sql); $first_name = mysql_result($result,0,applicants.FirstName); echo "Congratulations you have been successfully registered " . $first_name; mysql_close($con); ?>
×
×
  • 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.