Jump to content

php.ajax.coder

Members
  • Posts

    78
  • Joined

  • Last visited

    Never

Everything posted by php.ajax.coder

  1. 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
  2. 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 />"; } ?>
  3. Store them using a one way hash 'md5' or more secure 'sha1' <?php $pswd = md5('password'); $pswd = sha1('password'); ?>
  4. 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); } ?>
  5. 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.
  6. 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
  7. Hi Does any one know of any good tutorials for paypal web payments pro, or recommend books Thanks in advance
  8. 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
  9. 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 !
  10. 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.
  11. You need to use the isset function <?php session_start(); if(isset($_SESSION['username'])); { $username = $_SESSION['username'];
  12. SELECT image,id,projecttitle,projectcode,FROM portfolio ORDER BY id DESC LIMIT 16 you need to remove the comma before 'FROM' SELECT image,id,projecttitle,projectcode FROM portfolio ORDER BY id DESC LIMIT 16 Hope that helps
  13. 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);
  14. 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 }
  15. 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]);
  16. echo "<a href="$nt[$i].html">$nt[$i]</a>";} Try this... echo "<a href='" . $nt[$i] . ".html'>" . $nt[$i] . "</a>";}
  17. You can use mod_rewrite to do this http://blogs.sitepoint.com/guide-url-rewriting/ Google 'mod_rewrite' lots of tutorials
  18. http://www.learn-sql-tutorial.com/Views.cfm Found this hopes it helps
  19. Have you tried increasing the length value in fread fread ( resource $handle , int $length ) $result =fread($fp, 1024);
  20. Does anyone know of a good free gantt chart creator tool Thanks
  21. 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
  22. I have a path C:/Folder/Folder/../file.txt is there a php function to evaluate to C:/Folder/file.txt
  23. i think you can use if(ereg("xyz", $string){ }
  24. Is there a simple way to reload a php page when completed
  25. 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
×
×
  • 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.