AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
okay so you'll use something like $getname = $_GET["name"]; $cleanname = array("-","/"); $name = str_replace($cleanname,"'",$getname); $name should output papa's ew.. Note: you can actually write it like this as well... $string = "Papa's";
-
yes I do that as well if the list is short..however if the list is rather large this will take more time then I want to devote...again i'm just throwing this idea out there..
-
if you test this, it actually won't work while the string is encased in double quotes...this will only work if it is encased in single quotes...double quotes are mainly used to escape special characters..however characters that do not need to be escaped will display the backslash as well...
-
hey guys, another suggestion here...normally I use the "show unread posts..." and "show new replies.." links as they are very convenient..bravo there...however when I am looking at the list, sometimes I would like to mark only certain messages as read to get them out of the list instead of marking all of them as read and losing the entire list...just a thought.
-
$string = 'Papa\'s';
-
i normally do this with a database, when a user logs in, i set a field named something like "online" to a value of 1, when a user logs out, I set it to 0...to get a list of online users, display all of the rows where online = 1
-
yeah im pretty much done helping this person, if I dont write the code for them they don't understand..
-
$file_type = array("image/gif","image/jpg","image/png"); $image_type = $_FILES["image"]["type"]; if(in_array($image_type,$file_type)){ // correct file type } $max_size = 1048576; $file_size = $_FILES['image']['size']; if($file_size > $max_size){ // too big } incorporate these into your script
-
"SELECT *, ( 3959 * acos( cos( radians($lat) ) * cos( radians( loc_LAT_centroid ) ) * cos( radians( loc_LONG_centroid ) - radians($lon) ) + sin( radians($lat) ) * sin( radians( loc_LAT_centroid ) ) ) ) FROM allStores AS distance WHERE distance <= '$miles' AND name LIKE "%$name%" ORDER BY distance"
-
That will not be empty. It will contain error data in case there was no uploaded file. Actually you could do it with is_uploaded_file() like WebStyles mentioned much earlier. if (is_uploaded_file($_FILES['image']['tmp_name'])) { // Save to db } EDIT: changed post a little
-
true sorry about that, however i was under the impression that is_uploaded_file was already attempted here..?
-
you want if(!empty($_FILES['image']["name"])){ also, is your "uploadfile" and "executeSQL" functions custom? EDIT: edited array
-
the image name? create a function and pass it as an argument to your js function..
-
try adding another line declaring the timeout without storing it in a variable.. setTimeout(nextslide, 2500);
-
what you are doing is redirecting without first checking if the user has clicked the submit button, so one or more of your if statements is return TRUE each refresh..thus redirecting in an infinite loop.. use isset to first make sure that the user has submitted the form.. if(isset($_POST['myForm'])){ //continue with form processing }
-
in my opinon, trying to setup a mail server on localhost is not worth the trouble, I would wait to tamper with the mail() function until the OP has put his script on a server
-
probably has something to do with the version of PHP you are using in correlation to the heredoc syntax?
-
i don't understand..if a user does not choose a file to be uploaded via the file type input field...no tmp file will be uploaded in the first place..
-
function nextslide() { // Hide current slide object = document.getElementById('slide' + current); //e.g. slide1 object.style.display = 'none'; // Show next slide, if last, loop back to front if (current == last) { current = 1; } else { current++ } object = document.getElementById('slide' + current); object.style.display = 'block'; var timeout = setTimeout(nextslide, 2500); object.onmouseover = clearTimeout(timeout); object.onmouseout = timeout; }
-
MY EMAIL IS NUJASQUIRREL14@MSN.COM.. email me OP, one thing I suggest is that you check to make sure that all of the required fields are filled out before attempting to use them...something like. if(!empty($emailField = $_POST['email']) && !empty($emailField = $_POST['name']) && !empty($emailField = $_POST['company']) && !empty($emailField = $_POST['dept']) && !empty($emailField = $_POST['comment'])){ // continue to send mail }else{ // all required fields are not filled out.. } Also, what errors are you receving? do you have error_reporting set to E_ALL?
-
if you are determined to do this, seeing your code will definitely help to come up with the correct logic here
-
I second this one
-
contact your server host, not your ISP