Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. 1 - please use the proper tags which are square brackets containing the word code to begin and the word /code to end  when posting code. 2 - when you have a specific error and line no. it is nice to highlight that so that we can hone in on it. That said - you have one place where 'Submit' is used as an index: if($_POST['Submit'] == "Send") { You apparently do not have an input element (submit button?) named 'Submit'. What are the name= attributes of your type='submit' tags?
  2. Start writing - when you have a problem - come back with a question and a sample fo your code
  3. Where did you get it and why do you want to use it and what makes you think it's what you need/want? You really want to use some code that you don't know anything about, and can't read?
  4. More likely you want to move the file so that is reachable by your html code. Changing the root (is that possible?) could end up breaking your other code (if you have any) by making your relative paths no longer correct.
  5. oops - now I see some pieces of php code. First question - why ask us? Why not ask the person(s) you got it from?
  6. Where do you set $company? And - this is going look screwy on screen since you have no space holder for the 'missing' company name. Is there a reason you are using a very unorthodox list? Why not a table without borders?
  7. Or better yet - run your php ahead of all this and set the 4 radio buttons check values ($chk_none,$chk_min,$chk_sup,$chk_full) prior. Then in the html you can just say: echo "<input type='radio' name='flag' value='full' $chk_full> full "; echo "<input type='radio' name='flag' value='supported' $chk_sup> supported "; echo "<input type='radio' name='flag' value='minimal' $chk_min> minimal "; echo "<input type='radio' name='flag' value='none' $chk_none > none ";
  8. Interesting. Very interesting.... From the original post showing the desired output, I would never have guessed anything but an html table. Interesting....
  9. The php manual is very good on teaching pdo and prepared strings
  10. Simply wrap each variable in a call to the MySQL_real_escape_string call. Of course as mentioned above you should switch to pdo and use prepared statements since MySQL_* is deprecated and soon to disappear. PS - I've read that is bad practice to use $_REQUEST. You should already know how your user is getting here, so use the proper array instead of whatever a potential hacker could have sent you.
  11. If all you are asking is about how to sanitize your input for a query, why did you post so much code? Really - we don't need to see your js code, not your html for that matter. Just your php and your current attempt would be so much easier to read
  12. I might want to read batches of records and then process and write them back, either one at a time or in batches again.
  13. Other than moving step 2 to the end so that you are assured that the process is complete, what's wrong with this approach? (assuming that an sql file is a table)
  14. Your code is confusing after reading what you intend for it to do. How about putting some detailed comments in there to help guide us?
  15. When you create your html table row output you have to use some logic to determine whether to place a company name in the cell or a &nbsp char. It's not an automated feature - it's a logical one. So - you keep track of the last company shown and if the current one matches you don't place it in the td element this time.
  16. As I was reading your code the first question that came to mind was "where is $position coming from" But you question at the end resolved that one and created a new one. What do you mean "retrieve the position"? Is position a field in your table - just add it to the query. If not, where does position come from?
  17. Turn on php error checking and also check the results of your call to query and you would have answers. Basically - you left off the quotes in your query statement values, which btw are not secure.
  18. You need quotes around your username value, just like one needs quotes around any string argument in a query. Otherwise MySQL thinks you have provided a column name.
  19. can you simply post the code that sends that link, showing us what you place in that link (in the code)?
  20. Assuming that you figure out your connect problem, I'll point out the other errors you will encounter. You also should be sure that you have php error checking turned on to help you out. 1 - php is case sensitive - meaning that upper and lowercase used in var names is a pia. Stick to lowercase and avoid this problem. 2 - spelling errors in var names 3 - dates need to be in yyyymmdd format to place into a date field. Check out the strtotime and date functions as to how to do this. 4 - you only need to quote string vars in your query statement - nums (& dates) do not need them. 5 - you must be sure that your field names and values in the query statement are in the same order.
  21. If you have looked at the manual, you should realize that your arguments do not require parens around them.
  22. Don't understand what you are doing. You say you are sending out an email with a link in it. So what is all this about the link changing??? And what does godaddy have to do with this?
×
×
  • 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.