cmgmyr
-
Posts
1,278 -
Joined
-
Last visited
Never
Posts posted by cmgmyr
-
-
is there any reason why they need to be random? most businesses just have a running number (like auto_increment)
-
OOP is putting a group of related functions in a class...then you can reuse that class later and whatever is in it.
-
see, there ya go, easy enough right?
-
you can re-use your code a lot faster and easier. it's also easier to link ideas/functions together with it.
-
-
well you can also say something like "you will make a lot of $ off of ads" and that is true if you have a quality site with lots of traffic. Either through something like google adsense and/or selling ad space.
-
you can start here: http://www.w3schools.com/jsref/jsref_onkeyup.asp
then you can use the onkeyup to update content in a div
-
Photoshop + Dreamweaver + CSS + PHP + MySQL
thats all you need!
-
welcome! I think you will get a lot out of these forums...i know i did
-
I think the way I'm reading this you are refering to keeping emails/contacts/to-do lists/milestones straight between the 2 projects? is that correct? if so you should really look into something like BaseCamp check out some of the plans. It's a very small investment to keep you organized. I like it a lot.
-
$500 is REALLY unfair to you. You will be doing a LOT more work...even if you did get all pre-made software (for free) like tippy_102 said.
I would probably charge about $5,000 for this project, just because I have everything built except for the blogs and CCbill, so everything else can be up and running within about 2-5 hours. BTW...that's $5,000 for the PHP/MySQL programming only, this does not include design and front end stuff like HTML/CSS layout
-
no one else?
-
ok cool, I just don't wanna see someone NOT use your product for something like that.
-
wow, that's pretty cool. I don't use Unix all that much but I think it's pretty neat that you can do stuff like that.
So what happens when you want to use the caps lock? You should make a work around where it's like Shift+Caps to actually turn the Caps on. Just a thought
-
Yes, CS3 can do what wildteen said. just look it up in the help section
-
I like tama's they sound pretty good. I have a Mapex Orion Classic, Tama Swingstar (for practice), Tama Starclassic Birch, and a Pearl Reference Special Edition for 2007 (only 1 of 40 made). I love music and playing...even MORE then PHP haha
...So as promised, here is a little snapshot of my desk
[attachment deleted by admin]
-
@thorpe - What kind of drum set is that?
@roopurt18 - I have the same chair that you are sitting in. Isn't it great! I love mine. And gotta love the klipsch speakers.
...I'll take some pics of my set up tomorrow.
-
<?php $query = "INSERT INTO users (username, club_id, member_type, first_name, last_name, email, password, registration_date) VALUES ('$u', ".$_POST['clubdrop'].", 'Member', '$fn', '$ln', '$e', PASSWORD('$p'), NOW() )"; ?>
-
yeah either way you need to do it.
you can also do something like this:
<?php foreach($your_array as $new_value){ echo "Do something with $new_value"; } ?>
You can do that so you don't need to know how many are in the array
-
$total = count($your_array);
-
INSERT INTO `table` (club_id) VALUES ($_POST['clubdrop'])
does that work?
-
Try something like this:
<select name="clubdrop"><option value="">Pick</option> <?php $sql = "SELECT * FROM club"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ $club_id = $row["club_id"]; $clubName = $row["clubn"]; $club_id == $YOUR_OTHER_CLUB_ID ? $sel = 'SELECTED' : $sel = ''; ?> <option value="<?php echo $club_id ?>" <?php echo $sel ?>><?php echo $clubName ?></option> <?php } ?> </select>
-
Here is my code that I used:
<?php $end = ''; $zip_from = $_SESSION['zipcode']; $zips = $z->get_zips_in_range($zip_from, $_SESSION['radius']); $zip = ''; $x = 1; $count_zips = count($zips); if($count_zips > 0){ $zip = "zip = $zip_from OR "; } foreach ($zips as $key => $value) { $zip .= "zip = $key"; if($x < $count_zips){ $zip .= " OR "; }else{ $zip .= " "; } $x++; } $end .= $zip; $sql = "SELECT * FROM dealers WHERE access = '1' AND search = '1' AND ($end) ORDER BY cname ASC"; $result = $db->query($sql); $numrows = $db->numRows($result); if($numrows > 0){ $dealers = array(); while($row = $db->fetch($result)){ $cname = $row['cname']; $address = $row['address']; $city = $row['city']; $state = $row['state']; $zip = $row['zip']; $phone = $row['phone']; $url = $row['url']; if(strlen($url) > 0){ $url = $func->convertURL($url); $url = "<a href=\"$url\" target=\"_blank\">Visit their Web site</a><br />"; } $map = "$address $city, $state $zip"; $map = str_replace(' ', '+', $map); $miles = $z->get_distance($zip_from, $zip); $address = "$address <br />$city, $state $zip<br />$phone"; $dealers[] = array("name" => $cname, "address" => $address, "map" => $map, "miles" => $miles, "url" => $url, "zip" => $zip); } //Get dealers in the selected zip and sort out others $dealers1 = array(); $dealers2 = array(); $count = count($dealers); for($x=0;$x<$count;$x++){ $name = $dealers[$x]['name']; $address = $dealers[$x]['address']; $map = $dealers[$x]['map']; $miles = $dealers[$x]['miles']; $url = $dealers[$x]['url']; $zip = $dealers[$x]['zip']; if($_SESSION['zipcode'] == $zip){ $dealers1[] = array("name" => $name, "address" => $address, "map" => $map, "miles" => $miles, "url" => $url, "zip" => $zip); }else{ $dealers2[] = array("name" => $name, "address" => $address, "map" => $map, "miles" => $miles, "url" => $url, "zip" => $zip); } } $dealers2 = $func->sortMultiArray($dealers2, 'miles'); $dealers = array(); $dealers = array_merge($dealers1, $dealers2); } ?>
And how to sort a multi-dimentional array
<?php function sortMultiArray($array, $index, $order='asc', $natsort=FALSE, $case_sensitive=FALSE){ if(is_array($array) && count($array)>0) { foreach(array_keys($array) as $key) $temp[$key]=$array[$key][$index]; if(!$natsort) ($order=='asc')? asort($temp) : arsort($temp); else { ($case_sensitive)? natsort($temp) : natcasesort($temp); if($order!='asc') $temp=array_reverse($temp,TRUE); } foreach(array_keys($temp) as $key) (is_numeric($key))? $sorted[]=$array[$key] : $sorted[$key]=$array[$key]; return $sorted; } return $array; } ?>
$dealers1 are the records where the zip code matches so the distance would be 0 miles. $dealers2 are the records where it needs to sort by distance. I hope this helps you out.
-
I had to do the same type of thing. What I did was enter in all of the values into an array (name, address, phone, zip, distance). Then I re-sorted the array by distance then outputted the information.
Using DEFINED variables in a webpage
in PHP Coding Help
Posted
can you show us the code that you are using?