Jump to content

fugix

Members
  • Posts

    1,483
  • Joined

  • Last visited

Everything posted by fugix

  1. place your message in double quotes and try placing a "\r" on the end of each line
  2. to my knowledge, you cannot output both xml and html within the same http response. The client does not know what to do with it. You can output one or the other, will need to think of a workaround
  3. an array would not be ideal here, you could also use if else statements, however in your case i believe that a switch statement would be the most efficient way as gary80 states
  4. yes, however part of validation is filtering user information, which can be done in JS but is not recommended. Since javascript can be disabled via browser settings, which disables your validation and allows the user to pass any information that he/she wants and exploits your script to SQL injection...i strongly recommend using php to validate all user input
  5. let me make sure i understand you correctly. You want to have a include file that contains all of your pdf files, and you want to create a way for the script to determine which link to display based on which page you are on?
  6. shouldn't be too difficult, should be able to pull out the field values and use some math, can you post the code that you have so i can modify it?
  7. fugix

    Colored forms

    should be a simple change of the input's background-color, say you have a textbox like so <input type="text" id="input_box"> to change the background color, either use an external stylesheet, or in the head of your document specify css using the <style> tags, so you would have <style> #input_box { background-color:#eeeeee; } </style> using whatever color you'd like
  8. to combine select statements, use a union, for correct syntax of the union clause refer to this
  9. cqan you can the exact location where the error is being triggered, line 80
  10. judging by the words used, im simply concerned with helping you with your secret desires.
  11. if you are looking to find the total number of rows for used and new cars, then yes your syntax is correct.
  12. glad i could help, please mark this thread as solved, lower left hand of page.
  13. you would want to use the ALTER TABLE clause, use as follows. $query = mysql_query("ALTER TABLE table_name ORDER BY id DESC|ASC"); for further syntax examples visit http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
  14. any parse errors? I would recommend using firebug for firefox to troubleshoot javascript. Also, can you post the code that you have now?
  15. to put this very basically, you will want to direct you form action to a php page, then on that page you will grab your text box field $email = $_POST['email']; $submit = $_POST['continue']; then check is your submit button has been clicked, and if the textbox has been filled out. if(isset($submit)) { if(!empty($email)) { //proceed from here } } from here you can filter the user input, etc...
  16. a scary statistic really.
  17. first thing, you are trying to call a javascript event using php, I would not recommended this since php is executed on the server and js is executed on the client. The intermixing of the two usually results in unexpected results. Why not add to your jquery code a bit and add an .click event to trigger your functions?
  18. one of the users on that site poses a good point of javascript being disabled, not a big fan of using js for much, just found the article interesting how they did it, OP I would go with kingphillip's method as well
  19. let me make sure that i am understanding you correctly, you want to make it so the user cannot submit the form without the textbox being fiiled out?
  20. there is an interesting article that i found that uses javascript to handle this issue. http://myphpform.com/prevent-multiple-form-submissions.php
  21. is the value of the textbox being stored in a database? Also, i would recommend that you use php for any form validation, as if using javascript. the user can disable it and tamper with your data.
  22. instead of storing an array of id's into your database using serialize, why not create a field for storing your id's, and make it the primary key. If this is the way you would like to do it, your select mysql statement will be valid
  23. as for the select tag displaying the correct option for updating, you can try to use an if statement like so <tr> <td width="100">Machine Status</td> <td> <?php if($cd_status == "New"){?><select name="status" id="status"> <option value="new" selected="selected">New</option> <option value="used">Used</option> </select><?php } else if($cd_status == "Used") {?><select name="status" id="status"> <option value="new" >New</option> <option value="used" selected="selected">Used</option> </select><?php } ?> </td> </tr>
×
×
  • 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.