Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. My pet peeve about (inexperienced?) PHP programmers. Why use caps when you don't have to? Consequently I'm always on the lookout
  2. I suspect it is because of your habit of using capitals in naming your variables. IMHO a very bad habit. $mailsent is the culprit. I think you meant to write $mailSent.
  3. Get rid of the extra stuff like the <a> tags and the <font> tags and make this just about doing your query and displaying those results. Once that is working you can add the pretty stuff later. Oh - and show the code once you make those changes.
  4. Your nums are showing up in the first column aren't they? Add a "<td>&nbsp</td>" in front of the td for the num
  5. Then the OP has a short memory since his first test is whether the password element is ''.
  6. So why do you make a test against 'password' in the code that processes the form?
  7. OK - after I cleaned up your code so I could make sense of it, I see that you have no submit button. Apparently you are using JS to submit your form and so now you have to look at it and determine why the form's password fields are empty. Must be something you are doing in the JS function that you call in 'resetformhash' Question. Why all the divs? Do you really need two divs to enclose one input field?
  8. Can you just show us the ONE form that provides the information being displayed in your array dump? So much jumbled together html/php code to look at in your first post that it is hard to know what's what.
  9. You need to read up on doing JOIN queries so you can join the students to a group and not simply collect all the records from both tables that match your $tc value. btw - When you read up on JOINs you should read up on table aliases and try using them for your tablenames - makes it a lot easier to type your query and to read it later.
  10. Ps - looking at this code I get the impression that you don't know any php. Your coding skills and syntax errors are incredibly elementary. 1 - you are running the query twice - why? 2 - you are comparing a result row against the value of the radio button. Do you have any idea how impossibly wrong that is? 3 - you make reference to something called "$table(choice)" in your query statement. What is that supposed to be? 4 - you run the first insert query with nothing to capture the results. 5 - you create a query statement after #4 but you never run it Lastly you begin by running a query and capturing the results but you never use it. Plus I don't know what its relevance to the rest of the code is.
  11. Where is the syntax error?? (Hint: if you turn display_errors back on, you will get a line number from PHP)
  12. Apparently you know absolutely no php - and what is worse you don't even have the ambition to read up on it to figure things out. Sorry - but I feel no need to help out those who won't help themselves. good by and good luck.
  13. Save them as session vars. Or since you put them out to the form for the user to read, you can grab them from the form again when the user submits it, if you first make sure that the form is valid.
  14. Ok - so you echo out one form with the first row of data and you save the values in local vars. Now what do you do? YOu do realize that those vars will be gone once you exit this script to show the user the form? Oh - and BTW - this form has another of those stupid fragments of a line in it, so I am doubtful that you have ever run this code.
  15. $CustomerID = $_GET['CustomerID']; $FirstName = $_GET['FirstName']; $SecondName = $_GET['SecondName']; $PhoneNumber = $_GET['PhoneNumber']; echo "<form id=alleditcustomerform action='add-viewing' autocomplete='on' method='post' >"; echo "You have selected the following details.<br>"; echo "<br>"; echo "<label for='CustomerID'>Customer ID*:</label><br>"; echo "<input id='CustomerID' type='text' maxlength='20' name='CustomerID' value='$rowcustomer[CustomerID]' readonly /><br>"; echo "<label for='FirstName'>First Name*:</label><br>"; echo "<input id='FirstName' type='text' maxlength='20' name='FirstName' value='$rowcustomer[FirstName]' pattern='^[a-zA-Z]{2,20}$' required readonly/><br>"; echo "<label for='SecondName'>Second Name*:</label><br>"; echo "<input id='SecondName' type='text' maxlength='20' name='SecondName' value='$rowcustomer[SecondName]' pattern='^[a-zA-Z]{2,20}$' required readonly/><br>"; echo "<label for='PhoneNumber'>Phone Number*:</label><br>"; echo "<input id='PhoneNumber' type='tel' maxlength='11' name='PhoneNumber' value='$rowcustomer[PhoneNumber]' pattern='^\s*\(?(020[7,8]{1}\)?[ ]?[1-9]{1}[0-9{2}[ ]?[0-9]{4})|(0[1-8]{1}[0-9]{3}\)?[ ]?[1-9]{1}[0-9]{2}[ ]?[0-9]{3})\s*$' required readonly/><br>"; echo "<br>"; echo "<input id='addcustomertoviewing' type='submit' name='addcustomertoviewing' value='Add Customer' /><br>"; $CustomerID = $rowcustomer['CustomerID']; $FirstName = $rowcustomer['FirstName']; $SecondName = $rowcustomer['SecondName']; $PhoneNumber = $rowcustomer['PhoneNumber']; echo "</form>"; } Ok - I pulled some of your code out to make this point. At the top of this code you use the GET array to set some variables but then you use the query results to display the in the form. Then you set those local vars with the query results but you aren't displaying them anywhere.
  16. But that is not what we are seeing. How about showing us ONE simple set of code that all goes together where we can see what you are saying is happening? AND you still haven't answered the question concerning why you are using the GET array.
  17. While this code doesn't appear to be what I asked for, making it hard to piece together what is going on, my guess is that you do a query to populate $rowcustomer but then you set those vars using the GET array which may or may not have data and then you output those vars which may not have anything in them. Why are you using the GET array?
  18. Can we see the code that follows those corrected assignments?
  19. Your assignment of those variables seems flawed to me. $ProductID ='$rowproperty[ProductID]' ; is not going to assign the value of the row var, but rather the string: '$rowproperty[ProductID]' which is itself a flawed array reference. The proper form is $ProductID = $row[roperty['ProductID']; I noticed that your code begins by retrieving an awful lot of GET vars, but then your form clearly uses the POST method. Could this be part of your problem? Plus - using a GET for all that data is kind of risky.
  20. Please post your code properly. Read the rules. Now - what is the nature of your problem? If you wrote all the above code you know how to do everything you need to do, so what are you really asking us?
  21. Way too much code to go thru. Besides - you have some very strange php lines in this. What does this line do: $error And what do these lines do: mysql_real_escape_string($PostCode); mysql_real_escape_string($newrecord); That is certainly the syntax for that function. How about posting the part that is giving you the problem? Do you think a lot of people are going to wade thru your complete set of code to help you find one little problem?
  22. How do you know the first result is not in the first array element?
  23. When you get something written and want help with it, post 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.