Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. Assuming that a user with that userid has his projStatus set to Oopen, that should work. Have you made sure that the user id you are testing has his projStatus set to open? try echoing the query itself, and see what it looks like. Any more code would help, because just that snippet seems fine, but something else may be effecting it
  2. this variable $_POST["block_spam_bots"]. I don't see it anywhere in your form, but you seem to check if its value is 12. Perhaps this is causing the issue
  3. with your select query for buying just select where type='sale' or for renting, select where type='rent' obviously you could add more parameters based on what the query is doing (showing all, doing a search, etc.) but thats the basic idea
  4. http://www.tizag.com/javascriptT/javascriptconfirm.php The confirm box already returns true of false, you could could just do something like <input type="submit" onSubmit="confirm('update stuff?')" />
  5. yeah, sorry I got lazy and didn't feel like looking up the mime types, so I just kind of put the extension. thanks for clearing that up
  6. add a newline after every semicolon?
  7. I was using kaspersky a while ago, but since I reformatted my computer, I didn't feel like searching for good torrents, and good key code files, so I just installed AVG. it gets the job done, but Kaspersky was pretty amazing when I used it
  8. I think he means he wants to check the file type in the backend, not show the whole structure of the array. as jcombs said, the type attribute of files is the mime type not the extension mime type wiki article if you want the extension, you can do something like $extension = end(explode('.', $filename)); but the way you are checking can be slightly improved (not really for efficiency, but it will look cleaner) you can use in_array(), and make an array of allowed types, IE $allowed = array("jpeg", "html", "etc"); //check if the file type is right if (in_array($_FILES['file']['type'], $allowed)){ //continue } else { //exit }
  9. have you looked into the copy() function?
  10. I don't quite understand your question. If you don't have the column that will hold whatever value you want to save, why don't you just alter the table and add it, or create a new table
  11. assuming you entered firstname, and lastname into the two boxes above, the $_GET array would look something like $_GET: textFields (array) => 0 => firstname 1 => lastname //other stuff
  12. you can make your errors error multidimensional. That way you can do something like if (empty($_POST['search0'])){ //add error to errors array under the key search0 $errors['search0'][] = "You didnt enter anything in search0"; } and then you could just do that for all the other search buttons (and of course check for other types of errors.) You could output the error messages like if (!empty($errors)){//there were errors foreach($errors as $key=>$errors){ //key is the search box, and errors is an error with all the errors echo "Errors in search box $key: <br />"; echo implode("<br />", $errors); } }//end if
  13. this is mostly likely a Javascript issue if you want to dynamically pop up new windows. I would advice against popping up new windows, because I personally hate it. But if you really want to, window.open() is probably the function you want to look into
  14. What version of PHP are you using?
  15. why are you applying mysql_real_escape_string to empty data anyways?
  16. just do echo $payment; before the if statements
  17. hmm, echo $payment before those if statements ( and comment out the headers) and see what the variable holds. If it doesn't hold what you expect it to you will have to analyze any code before those if statements (or post it here) that alters the $payment variable (or sets it)
  18. you should just leave the action attribute out if you want to submit the form to itself. action="<?php echo $_SERVER['PHP_SELF']; ?>" leaves a vulnerability to XSS attacks in your form. Try doing a print_r on the POST array, and see what it has in it. That will probably help locate where the problem is
  19. The error tells you where the output was started. It seems to have started on line 3. Make sure you delete any whitespace, as whitespace counts as output and will make any header attempts not work. Also, you should put your code in code tags
  20. Do you want help with a script, or do you want someone to do it for you? If you want help, what you want to do depends on how your login system works. If you use sessions (which is probably the most common method) you will want to look into the isset() function. You can check if someone is logged in by doing something like session_start(); if (isset($_SESSION['my_logged_in_variable'])){ //do logged in stuff } to insert data into a mysql table, look into the insert SQL command, and look into the select command for getting data from the table
  21. The error pretty much explains your problem. You are calling a function that is undefined. Check the function name, and make sure you are including the correct file.
  22. without seeing any code there is not much chance of being able to get answers that aren't more than guesses
  23. Visual studio makes creating UI's, and other tasks easier. Some of the stuff it automates aren't hard to do, but are tedious. I do agree, C, and C++ are lower level languages, and give you a lot of versatility and control. depends on the task
  24. this isn't PHP, its javascript. but window.stop will stop the rendering and execution of the current page.
  25. What kind of column is date? varchar? datetime? timestamp? is it pulling up the last information on the table, instead of the newest information (IE its ordering in ascending order rather than descending order) Or is it just pulling out random rows?
×
×
  • 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.