Jump to content

scooby545

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

scooby545's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all, Im trying to create a splash screen that shows while my script executes in the background. The object is to display the screen while large files are being uploaded. Im looking for the best way of running a php script in the background ? thanx in advance scoob
  2. thankyou oni-kun that bit of code is very usefull still get the same problem with the code only working if i set the variable manually tho ??
  3. yeah all shoes as one line if i echo it out or type it in manually, which is what i cant understand. If i echo the non working variable out and copy it from the html source code into the php to specify it manually it works like a charm ? seems to be somthing to do with pulling the value from a mysql database and formatting it.
  4. hi guys, am well confused by this one ... am trying to insert a piece of html code as a variable : $code = "$rbel[mycode]"; $code = str_replace("\n", "", $code); $code = str_replace("\r", "", $code); $code = str_replace("'", "&#39;", $code); $code = str_replace('"', '&#34;', $code); $code = str_replace('<', '&#60;', $code); $code = str_replace('>', '&#62;', $code); echo' <script type="text/javascript"> var code = "'; echo"$code"; echo'"; </script> '; if i do the variable this way it echo's out in the html like so : var code = "&#60;P&#62;&#60;TABLE style=&#34;BORDER-RIGHT: 0px; PADDING-RIGHT: 5px; BORDER-TOP: 0px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: 0px; WIDTH: 650px; PADDING-TOP: 5px; BORDER-BOTTOM: 0px; BORDER-COLLAPSE: separate&#34; align=center&#62;&#60;TBODY&#62;&#60;TR&#62;&#60;TD style=&#34;BORDER-RIGHT: #aaaaaa 1px dashed; BORDER-TOP: #aaaaaa 1px dashed; BORDER-LEFT: #aaaaaa 1px dashed; BORDER-BOTTOM: #aaaaaa 1px dashed&#34;&#62; Single Column Text Element&#60;/TD&#62;&#60;/TR&#62;&#60;/TBODY&#62;&#60;/TABLE&#62;&#60;/P&#62;"; but refuses to work ?? if i type the variable in manually like : $code = "$rbel[mycode]"; $code = str_replace("\n", "", $code); $code = str_replace("\r", "", $code); $code = str_replace("'", "&#39;", $code); $code = str_replace('"', '&#34;', $code); $code = str_replace('<', '&#60;', $code); $code = str_replace('>', '&#62;', $code); $code = "&#60;P&#62;&#60;TABLE style=&#34;BORDER-RIGHT: 0px; PADDING-RIGHT: 5px; BORDER-TOP: 0px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: 0px; WIDTH: 650px; PADDING-TOP: 5px; BORDER-BOTTOM: 0px; BORDER-COLLAPSE: separate&#34; align=center&#62;&#60;TBODY&#62;&#60;TR&#62;&#60;TD style=&#34;BORDER-RIGHT: #aaaaaa 1px dashed; BORDER-TOP: #aaaaaa 1px dashed; BORDER-LEFT: #aaaaaa 1px dashed; BORDER-BOTTOM: #aaaaaa 1px dashed&#34;&#62; Single Column Text Element&#60;/TD&#62;&#60;/TR&#62;&#60;/TBODY&#62;&#60;/TABLE&#62;&#60;/P&#62;"; echo' <script type="text/javascript"> var code = "'; echo"$code"; echo'"; </script> '; it works perfectly, yet echo's out the same in the html ? am sure its somthing to do with the way php is treating the string, but dont know how to fix it any help would be greatly appreciated Scooby
  5. hi, i have created a search bar for my site which records the users search data into a table. the table name is `websmart_searches` and its structure is : `key` bigint(20) NOT NULL auto_increment, `search` varchar(255) NOT NULL, `user` varchar(255) NOT NULL, `blocked` varchar(255) NOT NULL default 'no', `date` varchar(255) NOT NULL, `IP` varchar(255) NOT NULL, `time` varchar(255) NOT NULL, if the user searches for "phpfreaks" it will add a row like : INSERT INTO `websmart_searches` VALUES(6, 'phpfreaks', 'me', 'no', '27th November 2009', '192.168.1.1', '13:52pm'); duplicate entries are allowed and needed. what im trying to do is look at the data in the table and extract out the 10 most popular searches, based on an exact match ? does anyone know if this is possible using an sql query ? thanks in advance dave
  6. hi, i have created a search bar for my site which records the users search data into a table. the table name is `websmart_searches` and its structure is : `key` bigint(20) NOT NULL auto_increment, `search` varchar(255) NOT NULL, `user` varchar(255) NOT NULL, `blocked` varchar(255) NOT NULL default 'no', `date` varchar(255) NOT NULL, `IP` varchar(255) NOT NULL, `time` varchar(255) NOT NULL, if the user searches for "phpfreaks" it will add a row like : INSERT INTO `websmart_searches` VALUES(6, 'phpfreaks', 'me', 'no', '27th November 2009', '192.168.1.1', '13:52pm'); duplicate entries are allowed and needed. what im trying to do is look at the data in the table and extract out the 10 most popular searches, based on an exact match ? does anyone know if this is possible using an sql query ? thanks in advance dave
  7. i believe this is a simular query to what im trying to do my data is in an sql table as follows : table name : searches search_word, date, time every time a user searches using the site a new row is added to the searches table. I want to pull out the top 10 searches from the table. Am i on the right track here ? cheers scooby
  8. you should be able to generate what ur after wiv this $pagename = $_SERVER["SCRIPT_NAME"]; $pagename = substr($pagename,strrpos($pagename,'/'),strlen($pagename)); $pagename = str_replace("/", "", $pagename); in order to pull out the dynamic content ur script must allready be pulling from a variable which u could tag onto the end of your href like this : <a href='$pagename?var=$dynamic_var'></a> hope this helps
  9. nah is still the same its like its locked into a loop wiv those sizes
  10. I FOUND THIS LITTLE CODE SNIPPET SOLVED THOSE ISSUES FOR ME ob_start(); header("Location: http://www.yoursite.com"); ob_end_flush(); exit; hope this helps
  11. hi, am using getimagesize to get the width and height of an image $dns_path = "http://www.mydomain.com"; $filename = "$dns_path/Uploads/Content/$row0[media]"; $fileinfo = getimagesize("$filename"); $imgwidth = $fileinfo[0]; $imgheight = $fileinfo[1]; have tried several variations of this script but just keep getting 1024 x 768 as the output have no idea where its getting those sizes from as the jpg is definatley there and is only 300 x 200 ?? am getting pretty confused and a little frustrated at this point anyone have any ideas what could be going on and why im getting these values ? any help on this would be greatly appreciated dave
×
×
  • 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.