Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Dtp1337

  • Rank
  1. Still getting an error to my display loop... Lab12.php
  2. On the database connection... I used other previous working programs I wrote and now I can't seem to access the database. They are now providing that I can't use them either... Does that mean my account holding my user/pass is removed? Nevermind I'm down to a problem with my loop and I guess those variables you mentioned. Lab12.php
  3. Notice: Undefined index: City1 in F:\xampp\htdocs\Lab12.php on line 16 Notice: Undefined index: State1 in F:\xampp\htdocs\Lab12.php on line 17Can't connect to MySQL Server. SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. Fixed the variables lol, and also corrected a couple of otther things I caught in the header and stuff. Does the first if{} if else{} work as for setting those check variables? As for the while loop where would I need to put that variable check? Lab12.php
  4. Could I use "exit" to prevent the loop? And I should place the validation into a If { } elseif stucture?
  5. Is this closer to what your talking about? Lab12.php
  6. I still don't think im getting it right... Lab12.php
  7. I'm also getting a unexpected else on line 24?
  8. Ok then in the loop would I place my loop there? and additionally for each else if?
  9. Yes and where exactly do I need that If statement? I had problems with it in the 1st 2 files I submitted. Of which I did switch them around cause it didn't make sense to me.
  10. I restarted from an example. Is that a little better towards what you described? I also uploaded it to the first post.
  11. Just displaying the City name selected, State selected, and the database for selection of both.
  12. I've been working at this provided that the user/pass are removed. I need to validate a form processing it to where it displays the city and state in the MySQL database. Can anyone help me piece this in order. I think I have 2 copies of what I have but I do not understand how to get it to say if the city is entered and the state is not, process city and request state. Likewise for state and when both are input, do both, Otherwise error and redo. Also its using PDO passing.Heres the 2 horrible ideas I've had so far. Can anyone please help me piece this thing together correctly. Lab12.php
  13. lol found that already lol thanks now I need to validate that the color and the food is selected when submitted. How and where would i palce that in my php form. This is what I have for it. Also something I found that may conflict with validing the use of the drop list, would i need to make an empty entry into the list before "Red" so that it will force the user to select one unless they over look it completely. edit#1-5 : Also I have an extra empty drop box between my droplist and buttons. Why is it there. <!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content
  14. ? This is what i've come up so far for the names and first array. It gives me a unexpected end error... !DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title> Lab 8 </title></head><body><form action =" " method="post"><h1> Enter your First and Last name, then select your favorite color and food.</h1> <p> Please provide your First Name. <input name="Fname" type="text" /><p/> <p> Please provide your Last Name. <input name="Lname" type="text" /><p/>
  15. Create an associative array that will be used in a form for a dropdown box for user to pick their favorite color. The entries should be:RedBlueGreenCyanMagentaYellowCreate a second associative array that will populate a set of radio buttons. The buttons should ask the user to choose their favorite type of food from following list.BarbequeChineseJapaneseThaiSteakVeganMexicanThe form should also ask for first and last name. Data should be validated. If invalid data is entered, and error should be displayed, otherwise, output the data. I have to create a form that sends the answers to the php. I
  • Create New...