-
Posts
2,965 -
Joined
-
Last visited
Everything posted by mikesta707
-
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
-
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
-
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
-
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?')" />
-
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
-
add a newline after every semicolon?
-
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
-
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 }
-
have you looked into the copy() function?
-
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
-
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
-
How to return user errors on multi-input search form?
mikesta707 replied to bossman's topic in PHP Coding Help
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 -
php / HTML - How to open a new window
mikesta707 replied to overlordofevil's topic in PHP Coding Help
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 -
Accessing parent variables in extended class
mikesta707 replied to ShaolinF's topic in PHP Coding Help
What version of PHP are you using? -
mysql_real_escape_string & NULL record
mikesta707 replied to robert_gsfame's topic in PHP Coding Help
why are you applying mysql_real_escape_string to empty data anyways? -
PHP form processing - not sure how to tackle an error message
mikesta707 replied to cleartango's topic in PHP Coding Help
just do echo $payment; before the if statements -
PHP form processing - not sure how to tackle an error message
mikesta707 replied to cleartango's topic in PHP Coding Help
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) -
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
-
PHP form processing - not sure how to tackle an error message
mikesta707 replied to cleartango's topic in PHP Coding Help
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 -
Basic input/ output secure-website question
mikesta707 replied to scunkphp's topic in PHP Coding Help
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 -
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.
-
without seeing any code there is not much chance of being able to get answers that aren't more than guesses
-
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
-
How to Stop whole script or Jump to function such as GoTo
mikesta707 replied to fbemo's topic in Javascript Help
this isn't PHP, its javascript. but window.stop will stop the rendering and execution of the current page. -
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?