Jump to content

tracy

Members
  • Posts

    177
  • Joined

  • Last visited

    Never

Everything posted by tracy

  1. If I have Apache and PHP running fine on WinXP laptop to be only used for testing purposes... Why won't MySQL install?  Used the installer and tried to change the proper association lines... Anyone know of a GOOD installer tutorial for mysql?  Thanks...one that works!
  2. could you elaborate?...I don't understand what you are asking...
  3. here's the new situation with this code... I rebuilt another website with three files:  the connection file, the display file and the load file, shown below.  The display works fine except that the picture is only the name of the picture.  That says the connection is good and the code generally is working.  The errors below tell me there is a security issue with permissions most likely. However, I built this new WEBSITE just to test this.  I had the files at standard settings and got the errors below.  I changed the images and the thumbs file to 777 and still nothing...same error.  I changed the file itself, the load file (the php code below) to permission 777 since the error says it can't write to itself...now I can't access the page at all again... Should we not use a self posting form or would this make a difference?  Thanks. Warning: imagejpeg() [function.imagejpeg]: Unable to open '/public_html/images//ephotos 3 004.jpg' for writing in /home/working/public_html/imageUPLOAD.php on line 34 Warning: imagejpeg() [function.imagejpeg]: Unable to open '/public_html/images/thumbs//ephotos 3 004.jpg' for writing in /home/working/public_html/imageUPLOAD.php on line 34 it's like I can't write to the photo file itself... here is the php... <?php $absolute_path = "/public_html/images/"; //Absolute path to where files are uploaded $thumb_path = "/public_html/images/thumbs/";  //Absolute path to where thumbs are to be stored if you want this $size_limit = "yes"; //do you want a size limit yes or no. $limit_size = "600000"; //How big do you want size limit to be in bytes $limit_ext = "yes"; //do you want to limit the extensions of files uploaded $ext_count = "1"; //total number of extensions in array below $extensions = array(".jpg"); //List extensions you want files uploaded to be function resampimagejpg($forcedwidth, $forcedheight, $sourcefile, $destfile, $imgcomp)    {    $g_imgcomp=100-$imgcomp;    $g_srcfile=$sourcefile;    $g_dstfile=$destfile;    $g_fw=$forcedwidth;    $g_fh=$forcedheight;    if(file_exists($g_srcfile))        {        $g_is=getimagesize($g_srcfile);        if(($g_is[0]-$g_fw)>=($g_is[1]-$g_fh))            {            $g_iw=$g_fw;            $g_ih=($g_fw/$g_is[0])*$g_is[1];            }            else            {            $g_ih=$g_fh;            $g_iw=($g_ih/$g_is[1])*$g_is[0];            }        $img_src=imagecreatefromjpeg($g_srcfile);        $img_dst=imagecreatetruecolor($g_iw,$g_ih);        imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih, $g_is[0], $g_is[1]);        imagejpeg($img_dst, $g_dstfile, $g_imgcomp);        imagedestroy($img_dst);        return true;        }        else        return false;    } if(!isset($_POST['submit'])){         if (($extensions == "") or ($extensions == " ") or ($ext_count == "0") or ($ext_count == "") or ($limit_ext != "yes") or ($limit_ext == "")) {            $extens = "any extension";         } else {         $ext_count2 = $ext_count+1;         for($counter=0; $counter<$ext_count; $counter++) {             $extens = "&nbsp; $extensions[$counter]";         }         }         if (($limit_size == "") or ($size_limit != "yes")) {             $limit_size = "any size";         } else {             $limit_size .= " bytes";             $mb_size = ($limit_size/1000000);         }         $pichead = "<li><font size=\"2\" color=660000>File extension must be $extens<b>";         $pichead .="</b></font>         <li><font size=\"2\" color=660000>Maximum file size is $limit_size ($mb_size MB)</font></li>         <li><font size=\"2\" color=660000>No spaces in the filename</font></li>"; ?> <html> <head> <title>HTML Form for uploading image to server</title> </head> <body> <form action="" method="post" enctype="multipart/form-data"> <html> <title>Add Vehicle Form</title> <body> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <table width=400 align=center> <tr> <td>Stock Number:</td><td><input type="text" name="stock" /></td> </tr> <td>Year:</td><td><input type="text" name="year" /></td> </tr> <td>Make:</td><td><input type="text" name="make" /></td> </tr> <td>Model:</td><td><input type="text" name="model" /></td> </tr> <td>Price:</td><td><input type="text" name="price" /></td> </tr> <td>Miles:</td><td><input type="text" name="miles" /></td> </tr> <tr> <td colspan=2 align=center><?=$pichead?> <p>Pictures:<br /> 1 <input type="file" name="pictures[]" /><br /> 2 <input type="file" name="pictures[]" /><br /> 3 <input type="file" name="pictures[]" /><br /> 4 <input type="file" name="pictures[]" /><br /> 5 <input type="file" name="pictures[]" /><br /> 6 <input type="file" name="pictures[]" /><br /> <input type="submit" name=submit value="Send" /> </p> </form> </body> </html> <?php } else { $i=0; $photoarray = array();   foreach ($_FILES["pictures"]["error"] as $key => $error) {   $file_name =  $_FILES["pictures"]['name'][$i]; // can call this anything you like this will take the original name   $file =  $_FILES["pictures"]['tmp_name'][$i];   $photoarray[$i+1]= $file_name;   $endresult = "<font size=\"4\" color=990000>$file_name uploaded successfully</font>";     if ($file_name == "") {     $pic = $i+1;     $endresult = "<font size=\"4\" color=990000>Pic#$pic Not selected</font>";     }else{       if(file_exists("$absolute_path/$file_name")) {       $endresult = "<font size=\"4\" color=990000>File Already Existed</font>";       } else {         if (($size_limit == "yes") && ($limit_size < $file_size)) {         $endresult = "<font size=\"4\" color=990000>File was to big</font>";         } else {         $ext = strrchr($file_name,'.');           if (($limit_ext == "yes") && (!in_array($ext,$extensions))) {           $endresult = "<font size=\"4\" color=990000>File is wrong type</font>";           }else{           // Save full size image with max width/height           resampimagejpg(1000,1000,$file,"$absolute_path/$file_name",0);           // Save thumb image with max width/height of 200           resampimagejpg(200,200,$file,"$thumb_path/$file_name",0);           //copy($file, "$absolute_path/$file_name") or $endresult = "<font size=\"4\" color=990000>Couldn't Copy File To Server</font>";           }         }       }     }   $i++;   echo $endresult."<br>";   } /********* Connection to mysql below  **********/ include "link.php"; /*********** End connection string ************/ $sql = "INSERT INTO inventory SET         stock = '".$_POST['stock']."',         year = '".$_POST['year']."',         make = '".$_POST['make']."',         model = '".$_POST['model']."',         miles = '".$_POST['miles']."',         price = '".$_POST['price']."',         photo1 = '".$photoarray[1]."',         photo2 = '".$photoarray[2]."',         photo3 = '".$photoarray[3]."',         photo4 = '".$photoarray[4]."',         photo5 = '".$photoarray[5]."',         photo6 = '".$photoarray[6]."'"; $res = mysql_query($sql); if(!$res){ echo "Could not insert Row<br>Error: ".mysql_error()."<br>SQL: ".$sql; } else { echo "Row inserted"; } } ?> </body> </html>
  4. Thank you both.  Working on it...having to rebuild some stuff...
  5. Yeah, I already contacted them...I appreciate it.  Thanks again.
  6. I tried the 777 and the 775 and I moved the folder for thumbs to the etc folder which is the same level as the www folder but an altogether folder.  No go...error line 34...same issue apparently.  Now I'm locked out of all those files for some reason...like a security thing.  Emailed my host... Changed the permissions from 777 to 666 to 775 and now back to 777...no access.  Thoughts?  Thanks. [quote author=craygo link=topic=118784.msg488259#msg488259 date=1166543480] ok i think your error may be a combination of a couple thing. The way the script is written the thumbs and the images shouldn't be in the same folder. Because the images and the thumbs are the same name you will get an error because it will try to overwrite one of them. Second some hosting companies do have limits on the file permission. try 775 on the folders. Make a thumbs folder in your images folder and use my example in my last post and it should work. If not post your current code. Ray [/quote]
  7. what directory should I use?  the html_public is the public directory...should I create a new folder in there and call it whatever and put the thumbs folder in it?  And what about security if I change the values on these to 775 or 777?  Thanks. [quote author=craygo link=topic=118784.msg488259#msg488259 date=1166543480] ok i think your error may be a combination of a couple thing. The way the script is written the thumbs and the images shouldn't be in the same folder. Because the images and the thumbs are the same name you will get an error because it will try to overwrite one of them. Second some hosting companies do have limits on the file permission. try 775 on the folders. Make a thumbs folder in your images folder and use my example in my last post and it should work. If not post your current code. Ray [/quote]
  8. Sometimes in the past when I set the security to 777 it won't work at all...none of the php pages, but I'll try it.  Someone said that is a security issue...what do you think about it? My structure is this: the main public folder that browsers surf to is public_html the images folder is public_html/images the thumbs folder is public_html/images By the way, so you won't think I'm lazy, I changed a lot of that in the code yesterday but it didn't work.  I'm certain it was probably my error, though...syntax or something.  Still learning this php...thanks again.
  9. You can achieve this using php.  The table has a certain number of rows.  The first step is to have php 'count' the number of rows and continue returning for the next line until it has reached the end.  Displaying the results of a table using php is typically a two step process:  1.  get number of rows  2.  display next row until last row is reached. 
  10. All right.  I researched the $full_path at the php manual site.  Could not find info that seems to apply in the first few lines of code...are you saying that by using "." after $full_path that it tells the php to use the same directory?  The thumbs folder is in the same location as the images folder on the server.  regarding the next to the last code I used, here are the errors...HOWEVER...it is loading all the data correctly except the photos...and shows error line 34 saying it can't write to the photo files (names them one at a time and then their thumbnail)...like it doesn't have permission. Then you sent the last code yesterday, I altered it some at the first few lines and it shows an error on line 22 and loads nothing into the database... here is my change: (the thumbs and images files are in the www folder which is the public folder for the server. <?php include('link.php'); // Link to thumbnail images in reference to where this page is $thumb_path = "thumbs"; // this will be in a thumbs folder in the same directory as this file // Link to full size images in reference to where this page is $full_path =  "."; // this would mean the full size images are in this same folder To answer your question, I'm trying to load these photos as 150x150 pixels (thumbnails) and link to the larger version.  However, I also could simply upload 200x200 pixel thumbnails and forget about the big photo...with no link to it and not have it take up space on the server... I tried to research this myself but can't figure out why it won't load...hate to trouble you but I appreciate it. [quote author=craygo link=topic=118784.msg487521#msg487521 date=1166468831] OK I changed a little to get rid of the red X's here is complete code [code]<?php include('link.php'); // Link to thumbnail images in reference to where this page is $thumb_path = "thumbs"; // this will be in a thumbs folder in the same directory as this file // Link to full size images in reference to where this page is $full_path =  "."; // this would mean the full size images are in this same folder $query= mysql_query("SELECT * FROM inventory") or die("ERROR:" . mysql_error()); $num = mysql_num_rows($query); if ($num == '0') { echo "Nothing Exist."; die(); } else { ?> <table border="0" cellspacing="2" cellpadding="2"> <tr> <td><font face=Arial>Stock#</font> </td> <td><font face=Arial>Year</font> </td> <td><font face=Arial>Make</font> </td> <td><font face=Arial>Model</font> </td> <td><font face=Arial>Price</font> </td> <td><font face=Arial>Miles</font> </td> <td><font face=Arial>Photo1</font> </td> <td><font face=Arial>Photo2</font> </td> </tr> <?php while ($info = mysql_fetch_array($query)) { $stock = $info['stock']; $year = $info['year']; $make = $info['make']; $model = $info['model']; $price = $info['price']; $miles = $info['miles']; if($info['photo1'] == NULL){ $photo1 = "[No image]"; } else { $photo1 = "<a href=\"".$full_path."/".$info['photo1']."\"><img src=\"".$thumb_path."/".$info['photo1']."\"></a>"; } if($info['photo2'] == NULL){ $photo2 = "[No image]"; } else { $photo2 = "<a href=\"".$full_path."/".$info['photo2']."\"><img src=\"".$thumb_path."/".$info['photo2']."\"></a>"; } echo " <tr> <td> <font face=Arial>".$stock."</font> </td> <td> <font face=Arial>".$year."</font> </td> <td> <font face=Arial>".$make."</font> </td> <td> <font face=Arial>".$model."</font> </td> <td> <font face=Arial>".$price."</font> </td> <td> <font face=Arial>".$miles."</font> </td> <td> <font face=Arial>".$photo1."</font> </td> <td> <font face=Arial>".$photo2."</font> </td> </tr> "; } ?> </table> <?php } ?>[/code] OK what the first few lines does is tell your script where the thumbnail images are and the full size images are. I should of asked you this before but if you only want one image and that image be a certain size then let me know. The insert script will have to change and this one. So now when this line runs [code]if($info['photo1'] == NULL){ $photo1 = "[No image]"; } else { $photo1 = "<a href=\"".$full_path."/".$info['photo1']."\"><img src=\"".$thumb_path."/".$info['photo1']."\"></a>"; }[/code] It will automatically find your thumbnail image and display it. And it will create a hyperlink to view the full size image. By putting those lines at the top, if you have images in a different folder you just have to change those line and not go through the entire script changing it. Ray [/quote]
  11. Thanks Ray.  I appreciate it.  Won't be able to try it until later but I look forward to it.  Take it easy.
  12. by the way, I don't quite understand your first five or six lines of explanations in this code.  I'm not sure I'm placing what I need to in those lines.  I thought I'd have to reference the path there, not the thumbs file... could you explain a little about that?  thanks for all your help.  I can tell this file is working differently because of the way it is displaying...all red x's with hyperlink outline...but I'm sure that's because I haven't set up the files right... do I need to change the file folder names or the path in this code?
  13. I'd like it at the top if that's ok...that way it's easier to change the pages for different databases and probably better code...thanks.
  14. But we can't put the path in the database, right?  We put the path in the display page?  Then how does that work? Here is my display page, that shows the red x where the photo should be...my instinct is to put the path and file name in the proper section of this code...would that work? <?php include ("link.php"); $query= mysql_query("SELECT * FROM inventory") or die("ERROR:" . mysql_error());  $num = mysql_num_rows($query); if ($num == '0') { echo "Nothing Exist."; die(); } else { ?> <table border="0" cellspacing="2" cellpadding="2"> <tr> <td><font face=Arial>Stock#</font> </td> <td><font face=Arial>Year</font> </td> <td><font face=Arial>Make</font> </td> <td><font face=Arial>Model</font> </td> <td><font face=Arial>Price</font> </td> <td><font face=Arial>Miles</font> </td> <td><font face=Arial>Photo1</font> </td> </tr> <? while ($info = mysql_fetch_array($query)) { $stock = $info['stock']; $year = $info['year']; $make = $info['make']; $model = $info['model']; $price = $info['price']; $miles = $info['miles']; $photo1 = $info['photo1']; echo (" <tr> <td> <font face=Arial>".$stock."</font> </td> <td> <font face=Arial>".$year."</font> </td> <td> <font face=Arial>".$make."</font> </td> <td> <font face=Arial>".$model."</font> </td> <td> <font face=Arial>".$price."</font> </td> <td> <font face=Arial>".$miles."</font> </td> <td> <font face=Arial><img src=".$photo1."> </font> </td> </tr> "); } ?> </table> <? } ?>
  15. Why wouldn't this display the table with the photo from photo1 cell? It worked before?  It's actually still working for all other cells just not the photo cells...red x only... I looked at the code and it seems it should work.  It should access that database cell, which should access the photo... <?php include ("link.php"); $query= mysql_query("SELECT * FROM inventory") or die("ERROR:" . mysql_error());  $num = mysql_num_rows($query); if ($num == '0') { echo "Nothing Exist."; die(); } else { ?> <table border="0" cellspacing="2" cellpadding="2"> <tr> <td><font face=Arial>Stock#</font> </td> <td><font face=Arial>Year</font> </td> <td><font face=Arial>Make</font> </td> <td><font face=Arial>Model</font> </td> <td><font face=Arial>Price</font> </td> <td><font face=Arial>Miles</font> </td> <td><font face=Arial>Photo1</font> </td> </tr> <? while ($info = mysql_fetch_array($query)) { $stock = $info['stock']; $year = $info['year']; $make = $info['make']; $model = $info['model']; $price = $info['price']; $miles = $info['miles']; $photo1 = $info['photo1']; echo (" <tr> <td> <font face=Arial>".$stock."</font> </td> <td> <font face=Arial>".$year."</font> </td> <td> <font face=Arial>".$make."</font> </td> <td> <font face=Arial>".$model."</font> </td> <td> <font face=Arial>".$price."</font> </td> <td> <font face=Arial>".$miles."</font> </td> <td> <font face=Arial><img src=".$photo1."> </font> </td> </tr> "); } ?> </table> <? } ?>
  16. my database is actually updating fine, which is good since I have had difficulty before to make that happen using a self form... the names of the images in the corresponding cells are the original names...just like the loaded name.  But they won't pull out of the file and show...I think this file you sent works, I just need to adjust my display php...I'll work on that on my own for now before I trouble you...thanks again...
  17. I keep getting an error on line 34... I changed permissions to 777 on the images folder and the thumbnails folder, which is in the images folder...did not work at all. Changed them back... Now it gives error on line 34...can the thumbnail folder be inside the images folder? [quote author=craygo link=topic=118784.msg487436#msg487436 date=1166461556] OK try this out. Make sure you change the paths at the top and put in your mysql connection. [code]<?php $absolute_path = "/path/to/your/full/size/image/folder"; //Absolute path to where files are uploaded $thumb_path = "/path/to/thumbnail/folder";  //Absolute path to where thumbs are to be stored if you want this $size_limit = "yes"; //do you want a size limit yes or no. $limit_size = "600000"; //How big do you want size limit to be in bytes $limit_ext = "yes"; //do you want to limit the extensions of files uploaded $ext_count = "1"; //total number of extensions in array below $extensions = array(".jpg"); //List extensions you want files uploaded to be function resampimagejpg($forcedwidth, $forcedheight, $sourcefile, $destfile, $imgcomp)    {    $g_imgcomp=100-$imgcomp;    $g_srcfile=$sourcefile;    $g_dstfile=$destfile;    $g_fw=$forcedwidth;    $g_fh=$forcedheight;    if(file_exists($g_srcfile))        {        $g_is=getimagesize($g_srcfile);        if(($g_is[0]-$g_fw)>=($g_is[1]-$g_fh))            {            $g_iw=$g_fw;            $g_ih=($g_fw/$g_is[0])*$g_is[1];            }            else            {            $g_ih=$g_fh;            $g_iw=($g_ih/$g_is[1])*$g_is[0];            }        $img_src=imagecreatefromjpeg($g_srcfile);        $img_dst=imagecreatetruecolor($g_iw,$g_ih);        imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih, $g_is[0], $g_is[1]);        imagejpeg($img_dst, $g_dstfile, $g_imgcomp);        imagedestroy($img_dst);        return true;        }        else        return false;    } if(!isset($_POST['submit'])){         if (($extensions == "") or ($extensions == " ") or ($ext_count == "0") or ($ext_count == "") or ($limit_ext != "yes") or ($limit_ext == "")) {            $extens = "any extension";         } else {         $ext_count2 = $ext_count+1;         for($counter=0; $counter<$ext_count; $counter++) {             $extens = "&nbsp; $extensions[$counter]";         }         }         if (($limit_size == "") or ($size_limit != "yes")) {             $limit_size = "any size";         } else {             $limit_size .= " bytes";             $mb_size = ($limit_size/1000000);         }         $pichead = "<li><font size=\"2\" color=660000>File extension must be $extens<b>";         $pichead .="</b></font>         <li><font size=\"2\" color=660000>Maximum file size is $limit_size ($mb_size MB)</font></li>         <li><font size=\"2\" color=660000>No spaces in the filename</font></li>"; ?> <html> <head> <title>HTML Form for uploading image to server</title> </head> <body> <form action="" method="post" enctype="multipart/form-data"> <html> <title>Add Vehicle Form</title> <body> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <table width=400 align=center> <tr> <td>Stock Number:</td><td><input type="text" name="stock" /></td> </tr> <td>Year:</td><td><input type="text" name="year" /></td> </tr> <td>Make:</td><td><input type="text" name="make" /></td> </tr> <td>Model:</td><td><input type="text" name="model" /></td> </tr> <td>Price:</td><td><input type="text" name="price" /></td> </tr> <td>Miles:</td><td><input type="text" name="miles" /></td> </tr> <tr> <td colspan=2 align=center><?=$pichead?> <p>Pictures:<br /> 1 <input type="file" name="pictures[]" /><br /> 2 <input type="file" name="pictures[]" /><br /> 3 <input type="file" name="pictures[]" /><br /> 4 <input type="file" name="pictures[]" /><br /> 5 <input type="file" name="pictures[]" /><br /> 6 <input type="file" name="pictures[]" /><br /> <input type="submit" name=submit value="Send" /> </p> </form> </body> </html> <?php } else { $i=0; $photoarray = array();   foreach ($_FILES["pictures"]["error"] as $key => $error) {   $file_name =  $_FILES["pictures"]['name'][$i]; // can call this anything you like this will take the original name   $file =  $_FILES["pictures"]['tmp_name'][$i];   $photoarray[$i+1]= $file_name;   $endresult = "<font size=\"4\" color=990000>$file_name uploaded successfully</font>";     if ($file_name == "") {     $pic = $i+1;     $endresult = "<font size=\"4\" color=990000>Pic#$pic Not selected</font>";     }else{       if(file_exists("$absolute_path/$file_name")) {       $endresult = "<font size=\"4\" color=990000>File Already Existed</font>";       } else {         if (($size_limit == "yes") && ($limit_size < $file_size)) {         $endresult = "<font size=\"4\" color=990000>File was to big</font>";         } else {         $ext = strrchr($file_name,'.');           if (($limit_ext == "yes") && (!in_array($ext,$extensions))) {           $endresult = "<font size=\"4\" color=990000>File is wrong type</font>";           }else{           // Save full size image with max width/height           resampimagejpg(1000,1000,$file,"$absolute_path/$file_name",0);           // Save thumb image with max width/height of 200           resampimagejpg(200,200,$file,"$thumb_path/$file_name",0);           }         }       }     }   $i++;   echo $endresult."<br>";   } /********* Connection to mysql below  **********/ /*********** End connection string ************/ $sql = "INSERT INTO inventory SET         stock = '".$_POST['stock']."',         year = '".$_POST['year']."',         make = '".$_POST['make']."',         model = '".$_POST['model']."',         miles = '".$_POST['miles']."',         price = '".$_POST['price']."',         photo1 = '".$photoarray[1]."',         photo2 = '".$photoarray[2]."',         photo3 = '".$photoarray[3]."',         photo4 = '".$photoarray[4]."',         photo5 = '".$photoarray[5]."',         photo6 = '".$photoarray[6]."'"; $res = mysql_query($sql); if(!$res){ echo "Could not insert Row<br>Error: ".mysql_error()."<br>SQL: ".$sql; } else { echo "Row inserted"; } } ?> </body> </html>[/code] Ray [/quote]
  18. I'll check it out...thanks...I appreciate it.
  19. Like in the html form above, each photo will have its own cell in the mysql table... and there can be actually no photos, so I'd set those fields to allow nothing there or the thumbnailed file names...
  20. That part doesn't matter that much to me...here's why: 1.  If I thumbnail the images to 125x125 for example, really small, I will need the original photo... 2.  If I thumbnail to 250x250 or so, medium size, then the original can be deleted, lost, whatever... Thanks.
  21. I have a similar issue and the solution was to create a php page (secured) for the client to log on, type the address in an html form and upload photos to the mysql database.  It was straight forward and simple for the client...literally about a minute per upload. I achieved this with much help here, to the credit to those who helped me.  Do you have any code yet?
  22. Do you need to keep the files in the original location even after they are approved and uploaded into the mysql database?  If not, why not delete them at that point or at least move them to another location and rename them...to say filenameOLD.whatever...?  For example, one could approve the file and upload to mysql and another function of that same php could be to send an email to whomever stating that the file was uploaded and copied to the 'old' file folder for backup...and deleted from the original location. Would this work?
  23. In the database, causing the fields to be not null should achieve this.
  24. also, you could try using phpmyadmin to check the code for specific issues on your server... [quote author=cty link=topic=119115.msg487342#msg487342 date=1166454676] Error message: Query failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 -------------------------------------- Can any one able to edit it in correct form?(*I using PHP5) ---------------------------------------------- $query="select count(*) from cart where cookieId ='GetCartId()' and bookid = '$bookid'"; [/quote]
  25. This is a similar version of that form.  I can write both the html form and the php insert form now, no problem.  The issue is with the insert form.  I have used it successfully to upload photos to the database.  The problem with this method is speed...displaying the table is slow with all these large photo files in the table (mysql). As far as what I am trying to do now, I can't successfully insert the portion of code that causes the photo to be thumbnailed and sent to a file while sending the image thumbnail name to the database.  I tried an online tutorial but it was a disaster.  Not even worth posting it was so bad.  I'd like to see an actual working version of the thumbnail part so I can see how it works and how it is structured.  Then with the tutorial and my research in the php manual I could probably successfully do my own... In your experience, if I thumbnail the images to 200x200 or so, would I even need to send the thumbnail to the file?  Or would my data table pull up rather quickly with 200 or so thumbnails in the actual database?  I think it would be way too slow...  [quote author=craygo link=topic=118784.msg487341#msg487341 date=1166454669] Do you need both, an insert form and an update form?? Is this for the other form we helped you with before?? Ray [/quote]
×
×
  • 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.