-
Posts
78 -
Joined
-
Last visited
Never
Everything posted by php.ajax.coder
-
I have got an install of opencart 1.5.1.3 which has been migrated to my remote host, All the configurations files have been altered to reflect the new host, all the file and folder permissions are set correctly But it is not displaying the front end (it just returns a blank page no source at all), but the backend is working fine Has any one had a similar problem, or got any suggestions Thanks in advance
-
Print each array element on new line
php.ajax.coder replied to savagenoob's topic in PHP Coding Help
try <?php echo "<pre>"; print_r($array); echo "</pre>"; ?> or you could use the following <?php foreach($array as $key => $item){ echo "[" . $key . "] => " . $value . "<br />"; } ?> -
Store them using a one way hash 'md5' or more secure 'sha1' <?php $pswd = md5('password'); $pswd = sha1('password'); ?>
-
Help converting seconds to minutes and hours
php.ajax.coder replied to edd12345678's topic in Javascript Help
Ran in to this problem a few days ago here's the code i use $time = the number of seconds <?php function format_time($time){ $seconds = $time % 60; $time = ($time - $seconds) / 60; $minutes = $time % 60; $hours = ($time - $minutes) / 60; //Format Number return sprintf('%02d', $hours) . ":" . sprintf('%02d', $minutes) . ":" . sprintf('%02d', $seconds); } ?> -
I would think it is php working out the size of the image on the following line list($width,$height) = getimagesize($myimage); you could try setting the $width and $height to a constant here to see if it is indeed slowing down your script Not sure this really helps because I'm not sure of any other way of getting the size of the image dynamically.
-
You need to change the following lines $vote = $_GET['votes']; if(isset($_POST['vote'])){ echo "voted"; echo $vote; } to if(isset($_POST['votes'])){ $vote = $_POST['votes']; echo "Voted : " . $vote; } Haven't tested this but is should work
-
Hi Does any one know of any good tutorials for paypal web payments pro, or recommend books Thanks in advance
-
try codeigniter has a very nice simple cart system but you need to have used php frameworks http://codeigniter.com/ Not sure it has a auction feature though
-
Installation of PHP on a web server
php.ajax.coder replied to Mythiel's topic in PHP Installation and Configuration
You need access to the server directly, if the hosting company is asking you to pay for it, then your not going to have the relevant access Lots of hosting companies don't charge extra for php, find another hosting company ! -
I don't believe this is possible in php alone you'll need to use javascript or use a combination to reload the page or call a script (AJAX) at regular intervals thereby effectively giving you the count down effect.
-
You need to use the isset function <?php session_start(); if(isset($_SESSION['username'])); { $username = $_SESSION['username'];
-
Installation: Writing data to a variable, in another file
php.ajax.coder replied to 3raser's topic in PHP Coding Help
Write the information to file example below from http://www.tizag.com/phpT/filewrite.php $myFile = "testFile.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "Bobby Bopper\n"; fwrite($fh, $stringData); $stringData = "Tracy Tanner\n"; fwrite($fh, $stringData); fclose($fh); -
If you db login system is using sessions, then you should be able to read the session variable and determine if the user is logged in You will need to know the name of the session variable if($_SESSION['logged_in']){ //Hidden information only logged in users see this }else{ //Redirect to login page or display error }
-
syntax for including variables within a href links
php.ajax.coder replied to wright67uk's topic in PHP Coding Help
You could use str_replace to replace the space If I remember it should work like this but you might need to look it up on the manual echo str_replace(' ', '_', $nt[$i]); -
syntax for including variables within a href links
php.ajax.coder replied to wright67uk's topic in PHP Coding Help
echo "<a href="$nt[$i].html">$nt[$i]</a>";} Try this... echo "<a href='" . $nt[$i] . ".html'>" . $nt[$i] . "</a>";} -
You can use mod_rewrite to do this http://blogs.sitepoint.com/guide-url-rewriting/ Google 'mod_rewrite' lots of tutorials
-
http://www.learn-sql-tutorial.com/Views.cfm Found this hopes it helps
-
Have you tried increasing the length value in fread fread ( resource $handle , int $length ) $result =fread($fp, 1024);
-
Does anyone know of a good free gantt chart creator tool Thanks
-
C:/Folder/Folder/../file.txt is the same as C:/Folder/file.txt but i need to evaluate the first to the second to be displayed
-
I have a path C:/Folder/Folder/../file.txt is there a php function to evaluate to C:/Folder/file.txt
-
i think you can use if(ereg("xyz", $string){ }
-
Is there a simple way to reload a php page when completed
-
I need to have a which returns the number of words which don't start with A-Z SELECT COUNT(*) FROM Dictionary WHERE Word LIKE 'A%' Other than saying NOT 'A%' AND NOT 'B%' etc.... is there a simple way of doing this Thanks