Jump to content

davidannis

Members
  • Posts

    627
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by davidannis

  1. Are you trying to have the two pages open in separate tabs in the user's browser?
  2. My guess is that you need a </form><form> between the two submit buttons so that only the top or bottom information gets submitted, but I'd need to see the form and the script to do more than guess.
  3. Could you use curl and screen scrape it from the FHA/VA sites? It might fail if they change the sites but until then...
  4. I believed that I answered the question: told you what the errors were and quoted the two lines of code that had the errors in them. I then went on to suggest that if you were coding in a good IDE all of the errors you posted would have been far less likely to occur and easier to spot. Please read my posts again.
  5. I don't see where you assign a value to $message. I've used tectite form mailer on godaddy, but on a linux VPS. No reason it shouldn't work for you and it is pretty flexible.
  6. There is not enough information in your post to begin to answer the question. What is the application written in? How many colors need to change? On how many screens? Is color dependent on some variable or static? Categories of what? Are the categories stored in a database? What information needs to be stored about each category? The list could go on. Please describe the application and the changes you want in detail to get a meaningful answer.
  7. Hopefully, if it's not one of the operations my 7 year old coded the OP can add another case to the switch statement. If not, perhaps my son can do it as a freelance job.
  8. use the examples you found to count the ones and then to count the twos and add the two results. $number_of_ones_and_twos=$ones+$twos; if you try it and have trouble, post your code and we'll help.
  9. Same issues here <input type=submit name=submit value=Remove< You should code in an IDE that will color code things and highlight mistakes. I use netbeans which is free and can be found at netbeans.org .
  10. This is wrong <form action=bills.php method=POST< No quotes around bills.php or POST, no > to close form tag.
  11. My son wrote this (with a little help from his dad): <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Calculator</title> </head> <body> <p> <form method="POST" action="Calculator.php"> <input type="text" name="x"><br /> <select name="operation"> <option value="+">+</option> <option value="-">minus</option> <option value="*">*</option> <option value="/">/</option> <option value="sqrt">square root</option> </select><br /> <input type="text" name="z"> <input type="submit"> </form> </p> <?php switch ($_POST["operation"]){ case '+': $answer=$_POST['x']+$_POST['z']; break ; case '-': $answer=$_POST['x']-$_POST['z']; break ; case '*': $answer=$_POST['x']*$_POST['z']; break ; case '/': $answer=$_POST['x']/$_POST['z']; break ; case 'sqrt': $answer=sqrt($_POST['x']); break ; } echo $answer; ?> </body> </html> any errors are mine.
  12. How do I know that id is an integer? Probably is but I don't think that you can tell from the code. If it is an integer and is never going to change to a string then you are right making it an int will be faster.
  13. remember to sanitize your data $id=mysql_real_escape_string($_POST['id']; DELETE FROM ... WHERE id = $id; to protect against sql injection attacks
  14. I missed that. mac_gyver is right. You need to fix both issues.
  15. Try enclosing the values in quotes: $write = "\"$FirstName\", \"$LastName\", \"$Age\"\n";
  16. Muddy_funster is right. You can set the error message in the loop and echo the error message after the loop completes: while(false!== ($file = readdir($res))) { if(strpos(strtolower($file),$q)!== false &&!in_array($file,$exclude)) { if (($info["extension"] == "mp3") || ($info["extension"] == "wav")) { }elseif(!isset($errorMsg)){ $errorMsg = "Your Error Message"; } } }// now we are out of the loop if (isset($errorMsg)) echo $errorMsg;
  17. I can't see the error. Does error reporting tell you anything?
  18. I was going to re-write this for the OP since he's trying, but before I do I have something that's puzzling me. Can anybody explain why this: $construct .="title LIKE '%Funny%'"; is not what I expected, which would have been this: $construct .="title LIKE '%$funny%'"; which I would have rewritten as: $construct .="title LIKE '%".mysql_real_escape_string($funny)."%'"; I'm clearly missing something.
  19. I don't see where your variable, such as $varFirst are assigned values.
  20. $construct contains unsanitized user input. It is easily exploited in an SQL injection attack. You need to sanitize the data. You can use http://php.net/manual/en/function.mysql-real-escape-string.php to do so. If you try to write the code, we'll help but we won't write it for you.
  21. Not sure how to sanitize $construct because we don't see how it is built but for $id or $per_page something like $id=intval($_REQUEST['id]); if ($id<1){ echo "error message about starting with an id that is at lest one'; // or redirect to an error page die(); }
  22. The @ before the mail suppresses error messages. I would remove it for testing at least. Is the body of the e-mail completely blank? Did it ever work? Is the subject line blank?
  23. Assuming that $id and $per_page are not passed in the URL/form and $construct is properly escaped it is fine. We'd need to see how those variables get values to be sure.
×
×
  • 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.