Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by harristweed

  1. while ($row2 = mysql_fetch_assoc($result2)) { //Define array to hold zips found within range. $range = array(); if((rad2deg(acos(sin(deg2rad($my_lat))*sin(deg2rad($row2['lat'])) +cos (deg2rad($my_lat)) * cos (deg2rad($row2['lat'])) * cos(deg2rad($my_lon - $row2['lon'])) ) ) )*69.09 <= $distance ) { $range[] = $row2['zip']; } //Implode the range arrary. $range = implode(',' , $range); echo $range; }//End of while loop. The array is redifined every time the loop loops! so will at best only contain one zip code.... //Define array to hold zips found within range. $range = array(); while ($row2 = mysql_fetch_assoc($result2)) { if((rad2deg(acos(sin(deg2rad($my_lat))*sin(deg2rad($row2['lat'])) +cos (deg2rad($my_lat)) * cos (deg2rad($row2['lat'])) * cos(deg2rad($my_lon - $row2['lon'])) ) ) )*69.09 <= $distance ) { $range[] = $row2['zip']; } }//End of while loop. //Implode the range arrary. $range = implode(',' , $range); echo $range;
  2. both free http://ckeditor.com/ http://www.tinymce.com/
  3. <a href="<?php echo "{$rsjobs['CompanyURL']}\"> {$rsjobs['CompanyURL']}";?></a>
  4. <?php $query1 =" SELECT * FROM jitem JOIN jloc ON jloc.jloc_id IN(jitem.jitem_location) WHERE jitem.jitem_display = 1 ORDER BY jitem_listorder"; if( $r = mysql_query($query1) ) { $ii = 1; while( $row = mysql_fetch_assoc($r) ) { if ($ii <= 5) { print "<td width=20% valign=top align=center>"; print "<a href='slides/{$row['jitem_slide']}' title='{$row['jitem_title']}' border=0 onclick=\"window.open(this.href, '','height=545,width=500');return false;\">"; print "<img border=0 src='thumbs/{$row['jitem_thumb']}' alt='{$row['jitem_title']}'/><br/>"; print "<font size=2 color=white><strong>{$row['jitem_title']}</strong></a><br/>{$row['jitem_desc']}<br/>"; print "\${$row['jitem_price']}</font>"; print "<br/><font size=2><a href=cart.php?itemid=".$row['jitem_id']."&action=add>Add To Cart</a></font>"; print "</td>"; $ii ++; if($ii==5){ print "</tr><tr><td colspan=5> </td></tr><tr>"; $ii = 1; } } } } else { print "Database returned no records. query1 is ".$query1.""; } mysql_close(); ?>
  5. As you are only using one table, you don't need UNION!
  6. hmmmm...I would suggest trying to insert a description outside of any functions. Just a simple.. <?php $update = "UPDATE Item SET description ='abcxyz' WHEREid = '$id' "; mysql_query($update, $link_id); ?> If that works it's your function, if not there is something else wrong!
  7. Yes but <?php $filename="image.jpg"; $split=explode(".",$filenames"); $name=$split[0]; $extension=$split[1]; ?> does not include the dot as request!
  8. <?php $filename = "image.jpg"; $dot=strpos($filename,"."); $first_part=substr($filename,0,$dot); $second_part=substr($filename,$dot); echo "first part =$first_part<br />\n"; echo "second part =$second_part"; ?>
  9. I'd try $sql = "(SELECT date, time, event, bands FROM listings WHERE date >= CURDATE() LIMIT 0, 2 )"
  10. http://jqueryui.com/demos/datepicker/
  11. java script is best for count down timers (imho) http://www.littlewebthings.com/2010/02/jquery-countdown-script/
  12. Your missing a closing brace <?php } } ?> should be <?php } } } ?>
  13. http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
  14. What version of PHP is your host running?
  15. change $result = mysql_query("DELETE FROM users WHERE id=$row['id']"); to $result = mysql_query("DELETE FROM users WHERE id={$row['id']}");
  16. http://www.tizag.com/mysqlTutorial/
  17. <b>Link: </b> <?php Echo '<a href="$site">$site</a>' ?> </center></br>
  18. I'm not sure but I think the problem is the isset! Try changing to : if(!empty($period[$i])|| !empty($gpa[$i]) || !empty($antecedent[$i])){
  19. Why not load them on to Youtube and put the embed link into your page. Your host company might complain about bandwidth usage if you get many views for a video that is streaming from your site hosting.
  20. frost110's answer is much better than mine!
  21. i assume that mysql_query($query)){ is outside your for loop therefore as you are aware only Cheetah Charly 3 are getting added try
  22. Missing $ on item_color while ($colors = mysqli_fetch_array($get_colors_res)) { item_color = $colors['item_color']; $display_block .=$item_color."<br/>"; should be: while ($colors = mysqli_fetch_array($get_colors_res)) { $item_color = $colors['item_color']; $display_block .=$item_color."<br/>";
  23. you are missing a " $display_block .=<p><strong><em>You are viewing:</em><br/> should be $display_block .="<p><strong><em>You are viewing:</em><br/>
×
×
  • 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.