Jump to content

jvrothjr

Members
  • Posts

    299
  • Joined

  • Last visited

Everything posted by jvrothjr

  1. ok then post got lost... and ideas on how to handle this?
  2. I have a page that passes values to it self (POST or GET same issue) Example: I have 8 rows of information each row its own record in the table (See Attachment example_1) as long as I dont have more then 8 rows it works great but when I add the ninth row the buttons stop submitting updates (but hyperlinks still work example {delete} Option) Any Ideas? its not only on this page but all links Modified Sry issues with posting. PC Locked up [attachment deleted by admin]
  3. Look at your permissions already! If thats what you got on the other post. Pissy dont get you the answer that will just get you igonred!!!!!!!!!!!!
  4. are you going to upload all the photo's in one directory or have a tree....
  5. format of the *.sql file I have had this issue going from one Rev of SQLyog to another. All so some versions of mysql have changed a dump from an older release will not import to a newer if you have also dumped the layout with it.....
  6. what about checking your ini file there is a max files size set in there as well that maybe limiting it
  7. echo "<FORM method=post>"; echo "<input name=atype type=text value='$atype'>"; echo "<input name=codeseries type=text value='$codeseries'>"; echo "<input name=cmd type=submit value='Submit'>"; echo "</form>"; have both with in the form function
  8. for ($i=1; $i <= $loopCnt; $i++) { $ghgh = $i+$mem[level]; echo "Congratulations! You are now level $ghgh and you gained 5 allocation points.<br>"; } $loopCnt being the number of time you wish to echo the statement
  9. if they are truley the fieldnames you could $querystring = "Select * from ".$DB; $result=mysql_query($querystring); while(($field = mysql_fetch_field($result))) { ${"{$field->name}"} = $data22[$field->name]; } This queries the DB and sets variable name to field names. Ex: Say we had table: Users with to 2 fields First Last This loop would create two variables $First $Last Maybe could replace ${"{$field->name}"} = $data22[$field->name]; with $_SESSION["{$field->name}"] = $_REQUEST["{$field->name}"]
  10. thumb_jpeg($form_data_name,$upload_dir,$thumbnail_path); function thumb_jpeg($image_name,$source_path,$destination_path){ //Create Thumbnail $new_width=150; //Image width Change if needed $new_height=150; //Image height Change if needed $destimg=ImageCreate($new_width,$new_height) or die("Problem In Creating image"); $srcimg=ImageCreateFromjpeg($source_path.$image_name) or die("Problem In opening Source Image"); ImageCopyResized($destimg,$srcimg,0,0,0,0,$new_width,$new_height,ImageSX($srcimg),ImageSY($srcimg)) or die("Problem In resizing"); Imagejpeg($destimg,$destination_path.$image_name) or die("Problem In saving"); }
  11. Thats not what this is for its for you to learn from there is a forum for asking some one to right the code for you. The general user don't have the time to do that for you. You posted in the help forum and this is what you got. sry maybe in the moring its bed time
  12. thats why I have mine set that way for ease of back up nightly. We have 2200+ photos in the DB right now. 1 - Data Table - 45mb 2 - Thumbnail table - 115mb 3 - Photo table - 336mb just add them three to the nightly sql dump and there backed up on tape. Now the data files them selfs are stored in a Dir structure of over 2gb (word,exel,etc....) but that was due to history of the old system. would have been nice to see the impack of storing them in the DB as binary but not going to rebo something thats working right now. if it aint broke dont fix it they always say.
  13. The other way would work but you would get a miss count if the amount was 0 or less you basicly do two queries (sure you could do with one) 1 - Count Row's with a value greater the Zero $query = "select count(*) from table where Amount > 0"; $CntRecordQuery = mysql_query($query); $Cntvar=mysql_result($CntRecordQuery,0,"count(*)"); 2 - Sum up the Amount $query = "select sum(Amount) as TotalAmount from table"; $result = mysql_query($query); $Totalamount = $result['TotalAmount']; echo "So far there has been $Cntvar donations<br>"; echo "We have gathered an amount of $Totalamount";
  14. In this case of files linked to user ID I would do this in a binary table. I prefer this to managing the files themselfs, plus you would need to link the file name to the user anyway just add an extra field or in my case another table linked to the user ID table itself. This will also allow multi users to have the same filename or use the same image as well as allowing the user to upload own image or use one from the public list thus not having multi images of the same thing. With that said you could have private and public photos/icon. Private only for the user that uploaded it and pubil open to all users. I use the database option for my photo album and limit the files size to 1MB. I display mine to the user as thumbnail autocreated on upload. this is also stored in a table. thus I have three tables for my function 1 - information data storage 2 - thumbnail with ID link 3- orig photo with ID link only displaying the thumbnail saving Bandwidth.
  15. http://www.snapfiles.com/Freeware/misctools/fwmoni.html http://awstats.sourceforge.net/ Many others out there
  16. make table 1 - ID 2 - Make Model table 1 - Make ID 2 - Model ID 3 - Model Year table 1 - Model ID 2 - Year Use a query of the table to display in the drop down box and as user selects one option display the next box with an if statment and the prior selection with set the display query for the next box and so on using the onchange java trigger to process the action. Dont have a sample code at this time with me but its not that hard
  17. if the keyword / trigger is sent vie cron (URL) the execute ?
  18. opps sry did not paste the right one your are missing a } at the end $del_art = mysql_query($del_art_query) or die ("del query error:" . mysql_error()); } } ?>
  19. The comments and keywords variables was onl;y looking at the last post for every record because the text boxs was not set as arrays. <?php include "header.php"; ?> <?php //Check to see if form has been submitted if (isset($_POST['submit'])) { require "dbconnect.php"; $uploaddir = '/home/ej3584/public_html/userpics/'; for ($i = 0; $i < count($_FILES['image']['tmp_name']); $i++) { if(!empty($_POST['keywords'][$i])) { $k = $_POST['keywords'][$i]; } else { $k = $_FILES['image']['name'][$i]; } if(!empty($_POST['comments'][$i])) { $c = $_POST['comments'][$i]; } else { $c = ""; } if (isset($_FILES['image']['tmp_name'][$i])) { $tempname = $_FILES['image']['tmp_name'][$i]; $uid = mysql_insert_id(); $uploaddir = '/home/ej3584/public_html/userpics/'; $name = $_FILES['image']['name'][$i]; $filename = $uploaddir . $name; $n = '/userpics/' . $name; if($tempname != '') { if(move_uploaded_file($tempname, $filename)) { chmod($filename, 0644); echo "The file has been uploaded"; $query = "INSERT INTO icons (image, keywords, comments) VALUES ('$n', '$k', '$c')"; $result = mysql_query($query) or die ("Could not upload" . $_FILES['image']['name'] . ": " . mysql_error()); } else { echo "The file could not be moved"; // $query = "DELETE FROM icons WHERE id = $uid"; // $result = mysql_query($query); } } } else { echo "Your submission was not processed."; } } } ?> <!-- Show the form to upload icons --> <h2>Upload LJ Icons</h2> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" method="post" enctype="multipart/form-data"> <table border="0" cellspacing="0" cellpadding="5" align="center" width="100%"> <?php for ($i = 0; $i < 5; $i++) { echo "<tr><td width='15%'>Image #" . ($i + 1) . ": </td><td><input type='file' name='image[]'</td></tr>"; echo "<tr><td>Keywords:</td><td><input type='text' name='keywords[]' /></td></tr>"; echo "<tr><td>Comments:</td><td><input type='text' name='comments[]' /></td></tr>"; } echo "<input name='process' type='hidden' value='1'>"; echo "<tr><td colspan='2'><div align='center'><input type='submit' name='submit' value='Add Icons' /></td>"; echo "</tr>"; ?> </table> </form> <!-- Show existing icons --> <h2>Your User Icons</h2> <?php require "dbconnect.php"; //Get icons $sql = "SELECT * FROM icons"; $result = mysql_query($sql) or die("Could not retrieve icons: " . mysql_error() ); $i = 0; echo "<table border='0' cellspacing='0' cellpadding='5' width='100%'><tr>"; while ($row = mysql_fetch_array($result)) { if(($i % 2) == 0 && ($i !=0)) { echo "</tr><tr>"; } echo "<td><div align='center'><a href='editicons.php?id=" . $row['id'] . "'><img src=" . $row['image'] . " /></a><br />"; echo $row['keywords'] . "<br />"; echo $row['comments'] . "<br /></td>"; $i++; } echo "</tr></table>"; ?> <?php include "footer.php"; ?>
  20. <?php function del_art($path,$num){ echo "<script language=\"JavaScript\">var answer = confirm(\"Are you sure you want to delete this file?\");if (answer){alert(\"File will now be deleted\");set = 1;}else{set = 0;}</script>"; $set = "<script language=\"JavaScript\"> document.write(set) </script>"; echo $set; if($set != "0"){ //get just the file name $filename = explode("/", $path); //delete the file $do = unlink("/var/www/html/logo/$filename[4]"); //delete the file from db records $del_art_query = "DELETE FROM `or_logo` WHERE `path` = '$path' AND `num` = '$num'"; $del_art = mysql_query($del_art_query) or die ("del query error:" . mysql_error()); } ?>
  21. True Question here would be are you planning on this forum getting larger or staying small. Your talking about using "Flat Files" to run a forum? choose your DB you would like to use as an option and do some research on it For one Mysql has many ways to set up a DB / Tables and and yes some DB's are dynamically others allocated for example MS Access you do have to compress. DB's do require maintenance. Plus if your worried about "Large text" limit the size of the post. but not 2^16 that would be over board.
  22. I use Cron job to do a SQL dump nightly "C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqldump.exe" --user=user --password=pass --all-databases>c:/backup/All_DB.sql
×
×
  • 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.