nadeemshafi9
Members-
Posts
1,245 -
Joined
-
Last visited
Everything posted by nadeemshafi9
-
You're a manchild. 1) Why would he try that when we already have a proper working solution? 2) I think you meant to say, "the good old inefficient way". 3) Why in the world would you use an array when they made the DOM class and XPath for this specific reason? Come on Nadeem, that's just silly. dont be so narrow minded he could probably find it more interesting, manchild lol
-
freal ? Sorry, I don't understand what you're saying, I only speak English. i know you are but what am i, to the original poster, you could try spliting the document into an array the good old fashioned way
-
freal ?
-
thats what you would think, but from experience i know they will go in, because mysql isnt adding these slashes so it wont remove them, they become part of your string, the first slash wont show, but when you edit it, the second slash will, it will keep on slashing it every time you edit, first slash will be removed but in teh db, to wich another slash will be added on edit, you need to add slashes on edit too. swhen you insert into the text box in your interface strip the slashes, the first slash is invisible, only when there are two it will become visible Yes, that is what I would think, because it is correct. The only time the slashes should appear in the inserted data is if you have badly written code/server setting combination. If you use mysql_real_escape_string, the only time you should get the slashes in your data, and hence have to remove them is if the data is being double escaped. This could be caused by magic quotes being enabled on the server, but since the OP was getting a problem with unescaped data, this doesn't appear to be the case for them. ok il keep that in mind thanks
-
does this class require any installastion reconfiguration ? importation linking ? or is it freely available in the environment
-
annoying isnt it, if you were mvc'd you could oiveride the insert method of teh base class of model
-
thats what you would think, but from experience i know they will go in, because mysql isnt adding these slashes so it wont remove them, they become part of your string, the first slash wont show, but when you edit it, the second slash will, it will keep on slashing it every time you edit, first slash will be removed but in teh db, to wich another slash will be added on edit, you need to add slashes on edit too. swhen you insert into the text box in your interface strip the slashes, the first slash is invisible, only when there are two it will become visible
-
i wish i could see things like that
-
short texts almost never have single quotes, long texts usualy paragraphs with hyphens cancel out the query beaus the query itself has a single quote to delimit values, a single quote in your string will read like values('blah's') it will end at 'blah' mysql handles slashing for everything else, you will need to remove the slashes for this one on teh way out otherwise every time you edit it it will get an extra slash and you have loads of slahses
-
those ones are hard to spot, i think you may have it there, well spotted
-
if its object oriented you need to find where its inserting the code eg something like tablename->insert(); basicaly to whatever your form posts to. action=filepostedto.php or maybe php self if its directly in teh query $sql = "insert into table values(".$story.")" just go to the page it posts to and do a search for insert or new or create or add
-
can ytou echo before $readFile = file($uploadFile); what version php you using turn error_reporting on
-
or addslashes(), i think single quotes conflict with the query itself, other than that mysql will add slashes to everything else and remove them when brogth out, you need to addslashes($string) and then remove them when you bring it out removeslashes or preg_replace() "insert into table values('blah "blah" bla's');" it can add and remove slashes from "blah" but blah' will end the value
-
trust me just print_r($_FILES['file']); before you do any checking so you can see what php see's
-
i think a whoile back i had this problem, and i think i rember it being that they have different mime types
-
can you output any php output anywhere else in your system, i mean is there any includes in this file above this ? if not your serve ris messed up
-
Do you even read threads before you post? not all of it no, original poster , you may have a slashing problem wich is killing it, you need to add slashes oi recon (maybe), isue is with single quotes, hyphens
-
try error_reporting(2047); //right ta the top //inside the loop echo $line; print_r($tmp); die(); have you looked at teh page source to make syure its not outing anything ?
-
change it to a text column in teh db, that should do the trick, it should be ok for a small database
-
see whats going in and confirm its not your fault echo $_FILES['file']['type']; if ($_FILES['file']['type'] != 'image/jpeg' || $_FILES['file']['type'] != 'image/png' || $_FILES['file']['type'] != 'image/gif') { echo ' <script type="text/javascript"> parent.document.getElementById("uploadTxt").innerHTML = "That file extension is not allowed: '.$_FILES['file']['type'].' Please try again." </script>'; return false; }
-
try echo $line; print_r($tmp); exit; after exploding it, you may need to check what your getting and paste it here
-
its very time consuming to get stuff to work in ie6 consider this browsers are force updated so everyone with windows conected to teh internet will be using ie8, and people who arnt well its up to you.
-
are your _ scores theoretical wildcards or code?
-
[SOLVED] Need a smart query. Next 12 results
nadeemshafi9 replied to Skipjackrick's topic in PHP Coding Help
LIMIT 0, 12 change these to variables "Limit ".$start.", ".$limit.";"; im not sure if the , is required -
[SOLVED] errors with uploadign and resizing image
nadeemshafi9 replied to runnerjp's topic in PHP Coding Help
$target = "http://www.runningprofiles.com/members/include/myimages/$uniqueurl.$file_ext"; $save = "http://www.runningprofiles.com/members/include/myimages/thumbs/" . $imagepath; //This is the new file you saving $file = "http://www.runningprofiles.com/members/include/myimages/" . $imagepath; //This is the original file $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; this wont doo mate, you need to start from var if its using ftp, and use relative paths if not, it dosent use ftp, so use relative paths eg from where you are right now ../../ or wherever you need to go