Jump to content

jvrothjr

Members
  • Posts

    299
  • Joined

  • Last visited

Everything posted by jvrothjr

  1. try this if (mysql_num_rows($result) > 0) { // yes // print them one after another echo "<table border=0 cellspacing=0 cellpadding=0 class=box_width_cont product>"; echo "<tr>"; echo "<td colspan=2>--------------------------------------------------------------------------------"; echo "</td>"; echo "</tr>"; while($row = mysql_fetch_row($result)) { $i++ if ($i == '1') {echo "<tr>";} // first cell echo "<td><center><img height=125 width=175 src=".$row[1]."></center>"; echo "<center><font color=#855b63>".$row[2].$row[3].$row[7]." Cut Size: ".$row[4]."</font><font color=#855b63 size=3>".$row[10]."</center></font>"; echo "<center><a href=items/".$row[0].".php><img src='images/button_details.gif'>[/url]</center>"; echo "</td>"; if ($i == '2') {echo "</tr>";$i='0'} } echo "</table>"; } else { // no // print status message echo "No items found!"; }
  2. well need more information on the structure you wish to use. you want many tables. linked or many records in one table.?
  3. Your could use tables. Loop thru that data and every 4th or 6th start another row
  4. if (!empty($values['VID'])) { for($i=1; $i<=17; $i++) { $values['vin'.$i.''] = $values['VID']{$i-1}; } } [\php]
  5. SELECT user.acc_no, report1.staff_no, user.name FROM user,report1 WHERE report1.staff_no = user.staff_no and user.bank ='Maybank' group by staff_no
  6. like looks for entry to be included with in the field Example if the field had aaandrewaaa and you search for andrew then it would find both aaandrewaaa and andrew not the other way around.
  7. MysqlQstring = "Select * from tablename where fieldname like '%value%'; this can be done as an mysql query
  8. ImageCreateFromJPEG($prod_img) ImageCreateFromGIF($prod_img) ImageCreateFromPNG($prod_img) HTTP://WWW.PHP.NET search these function
  9. $query = "SELECT skipperName, sum(matchPoints) as SummatchPoints FROM pts_table GROUP BY skipperName;"; $result = mysql_query($query); if(mysql_num_rows($result)) { while($row = mysql_fetch_row($result)) { echo' <table> <tr> <left><td>' . $row[skipperName] . '</td></left><br> <right><td><left>' . $row[summatchPoints] . '</td></right><br> </tr> </table>'; } }
  10. look into the betwen clause of the where statment
  11. turn error_display = on in the php.ini and tell us what the err is. that long winded description dont say much other then switched from php 4 to 5 and it dont work.........
  12. substring(0,3); replaced with substring(0,4); looks to be reading 3 char and not 4
  13. use the where clause $query = select * from table where field = '$value' or field > '$value';
  14. Build your query based on selection $query = "select * from jobs" if ($l <> "" or $c <> "") {$query = $query." where";} if ($l <> "") {$query = $query." Location = '$l' ";} if ($l <> "" and $c <> "") {$query = $query." and";} if ($c <> "") {$query = $query." Catrgory = '$c' ";} $query = $query." ORDER BY job_id DESC";
  15. If they was values in the db (0,1,2,3,4....) you could have searched with value => '$a'
  16. I run two at work one DVI and the other VGA.... Run to at home One VGA and the other (TV) S-Vid
  17. So you want php to detect the browser and based on that which ccs style sheet to load? if thats the question yes you should be about to do this.
  18. select * from users left join profileinfo on profileinfo.owner = user.id where users.id = '2' something like that
  19. I have found that the issue that this would be client side not server side and php is server side. For multi file upload I created a custome ActiveX control program to do this on the client side and trigger Autosubmit with in the upload page. Basiclly loading a page for each file to be uploaded but automaticly. other wise its an array and they do work its just you do have to select each file via a separat dialog box. [attachment deleted by admin]
  20. Well to check the file size before upload that would be a java issue because php is server side.
  21. So you want to pass the variable to the second page via hyper link This will create a hyper link for every record in the database pulled by your query string! <?php $query = "select * from catalog where merchant=$merchadmin order by $sort"; $result = mysql_query($query); while ($r = mysql_fetch_array($result)) { $item_numb = $r['item_numb']; echo "<a href='file_b.php?item_numb=".$item_numb."'>".$item_numb."</a><br>"; } ?> Second page use the get function to set the variable passed in the url $item_numb = $_GET[item_numb];
  22. Can you use a javascript onunload that kills the files on close?
  23. basiclly the page is index.php and rhe ?c=6 is a variable pasted to the page that creates some kind or reaction so the page your looking to edit is the index.php page.
  24. its your if statment it hits the first if {if($row[ebay_url])} and does not do the elseif echo "Price: "; if($row[ebay_url]) echo "<a href='$row[ebay_url]' target='_blank'><img class='none' src='comn/ebaymotors.gif'/></a>"; if($row[price]) echo $conf[currency].number_format($row[price]); elseif($row[price_alt]) echo $row[price_alt]; else echo "Call for Price"; if($row[sale]) echo "<br/><span>New Price: <strong>".$conf[currency].number_format($row[sale])."</span>"; echo "</strong><br/>";
  25. Here is a file I use to upload and convert jpg to thumbnails. <?php if ($submit){ /* Add backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte). */ $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); //set the picture id a unix timestamp. I thought this will not have repeatations. You can keep anything what you like // Add random number to time stamp to get ID Number // Get file extention $upload_dir="store/"; //Source File path $thumbnail_path="store/Thumb/"; //Thumdnail File Path $ext = substr($form_data_name,strlen($form_data_name)-3); $ext = strtolower($ext); // Verify file extention as supported formats if ($ext == "jpg") { if (move_uploaded_file($form_data,$upload_dir.$form_data_name)) thumb_jpeg($form_data_name,$upload_dir,$thumbnail_path); $datatn = addslashes(fread(fopen($thumbnail_path.$form_data_name, "r"), filesize($thumbnail_path.$form_data_name))); } } echo "<form method='post' action='$PHP_SELF'>"; echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"; echo "<tr><td>File to upload:</td><td><input type='file' name='form_data' size='64'></td></tr>"; echo "</table>"; echo "<input type='submit' name='submit' value='submit'>"; echo "</form>"; 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"); } ?>
×
×
  • 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.