Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. use this <?php $host="p41mysql63.secureserver.net"; // Host name ? $username="CourtneyBlacher"; // Mysql username ? $password="######"; // Mysql password ? $db_name="temp_members_db"; // Database name ???//Connect to server and select database.? mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); ? mysql_select_db("$db_name")or die("cannot select DB"); ?> replaced ###### with password
  2. welcome can you please click topic solved (bottom left) save other reading this trying to help when its been solved and welcome to the board
  3. not really.. i wouldn't dump a 100mb image resource to one LOL, i kinda look at them like cookies but more secure but remeber the sessions timeout..by the server, cookie timeout by the client i didn't bring up AJAX as your pass the variables just like a _GET.. i would probably choose MySQL and use _GET to pass the ID or something refering to a Unique Job
  4. this is a basic setup of using an external function <?php include "common.php"; hello(); bye("madtechie"); ?> common.php <?php function hello() { echo "hello world<br>"; } funtion bye($name) { echo "bye bye $name"; } ?>
  5. Sessions, cookies, mysql, flat file.. their all the same.. and they wont become messy by them selfs.. as for posting to php.. yep you can do that (lol but kinda messy) without knowing exactly what your doing its hard to say what route i would take but but to sum up.. passing a small amount of into use _GET, if private, temporary or a little larger use _SESSION (or _COOKIE's if not private), if much larger and you dont have SQL and its just a dump of data then flatfile, other than that use SQL
  6. updated (forgot some and too late to edit last post! <?php $ID = (int)$_GET['id']; if( $ID == 0 ) { return; } require_once("db_config.php"); require_once("db_connect.php"); $sql = "SELECT product_images.image_thumb FROM product_images WHERE product_images.id = $ID"; $result = mysql_query($sql) or die(mysql_error()); $row = @mysql_fetch_object($result); $img = $row->image_thumb; header("Content-type: image/jpeg"); //echo $img; imagejpeg($img); exit; ?>
  7. ok remove that line, and do this var_dump($row->Category); if ($row->Category == 1) { echo "test 1"; }
  8. do this just before the if add this echo "<pre>";print_r($row);die; whats displayed
  9. in a word .. NO,
  10. an example would help
  11. try this <?php $ID = (int)$_GET['id']; if( $ID == 0 ) { return; } require_once("db_config.php"); require_once("db_connect.php"); $sql = "SELECT product_images.image_thumb FROM product_images WHERE product_images.id = $ID" $result = mysql_query($sql) or die(mysql_error()); $row = @mysql_fetch_object($result); $img = $row->image_thumb; header("Content-type: image/jpeg"); //echo $img; imagejpeg($img); exit
  12. image.php will not work we're come back to that for now test imageDisplay.php directly
  13. without knowing the class its hard to say but from what you posted $delete = $db->delete($glob['dbprefix']."CubeCart_inventory", $where, "0,1"); should work
  14. try if ($datemade >= ($datemade+(2*24*60*60) )){
  15. as Daniel0 said. so ImagePNG($im,'image1.png') should be ok
  16. humm its running 4 times.. thats not right.. change $delete = $db->delete($glob['dbprefix']."CubeCart_inventory", $where); to $delete = $db->delete($glob['dbprefix']."CubeCart_inventory", $where, "0,1"); edit: updated
  17. close, try echo $query; mysql_query($query, $this->db); this should display DELETE blar blar blar blar blar blar can you post that, it may provide some insight
  18. imagejpeg — Output image to browser or file bool imagejpeg ( resource $image [, string $filename [, int $quality]] )
  19. can you please click topic solved (save other clicking here to help, only to find its solved)
  20. your see some statements like DELETE FROM table where X =1 normally in or near a mysql_query( in your included file (class) your see function delete( you need to echo the string being passed to mysql_query(
  21. $data = "statistics.STATUS "; $result = preg_replace('/.*\.(.*)/sim', '$1', $data);
  22. well as its handled by your class check from their.. echo the statements etc
  23. i assume you mean the URL of the current view page.. simpler code if so then <?php $cPage = $_SERVER["PHP_SELF"]; $parts = explode("/",$cPage); $page = $parts[count($parts)-1]; $path = $parts[count($parts)-2]; echo $path."~~".$page; ?>
  24. view source and check that the {PRODUCT_ID}&cat_id={CAT_ID} are set correctly (ie being the numbers and not static text)
  25. Cool, can you please click topic solved bottom left i'm glade it up and running
×
×
  • 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.