Jump to content

kendallkamikaze

Members
  • Posts

    184
  • Joined

  • Last visited

    Never

Everything posted by kendallkamikaze

  1. I just want it to say a numeral like 'this horse is entered in X number of shows.' the way it is now, it lists the same thing over and over.
  2. Title kind of explains it. This code below is functional, the issue is that I need it to just display the number of rows, and not all the rows. <?php $horseid=$_GET['id']; $query = mysql_query("SELECT * FROM class_event_entered WHERE horseid='$horseid'"); $number=mysql_num_rows($query); while($r=mysql_fetch_array($query)) { $horseid=$r["horseid"]; print "<font size='3pt' face='comic sans ms'>Show Entries - #$horseid is entered in $number shows.</font> <br> "; } ?>
  3. so apparently its not just firefox either, its Internet Explorer, and Google Chrome. It works fine in Opera.
  4. This code makes you have to refresh in firefox every darn time you click back. Is there anyway to fix this? <?php include "header.php"; $query=mysql_query("select * from player where id='$id'"); $row=mysql_fetch_array($query); //start event if($_POST[event2]){ $eeq=mysql_query("select * from class_event_entered where horseid='$_POST[horseid]' and class='$_POST[cid]'"); $ee=mysql_fetch_array($eeq); if($ee[horseid] == "$_POST[horseid]"){ print "<BR><BR><font size='4pt' face='comic sans ms'>Already entered in this class!<BR><BR> <input type=button value='Back to Class List' onClick='history.go(-1)'></font><BR><BR><BR>";include "footer.php"; exit;} print " <input type=hidden name=cid value=$result[class]>"; mysql_query("insert into class_event_entered ( `class` , `horseid` , `ofshow`, `rundate`) VALUES ('$_POST[cid]','$_POST[horseid]','$_POST[ofshow]','$_POST[rundate]')")or die(mysql_error()); $atype='mod'; if($atype == "diamond" || $atype == "Diamond" || $atype == "mod" || $atype == "Mod"){$upexp="1";}else{$upexp="1";} mysql_query("update horsedata set Exp=Exp+'$upexp',Points=Points+'$upexp' where id='$_POST[horseid]'"); print "<BR><BR><font size='4pt' face='comic sans ms'>Your horse was entered!<BR></font> <input type=button value='←' onClick='history.go(-1)'><BR><BR><BR>";include "footer.php"; exit;}; if($_POST[event1]){ if(empty($_POST[rundate])){print "<BR><BR><font size='4pt' face='comic sans ms'>You forgot to enter a rundate!<BR><BR> <input type=button value='←' onClick='history.go(-1)'><BR><BR><BR></font>";include "footer.php"; exit;} print " <input type=hidden name=hid value='$_POST[hid]'> <input type=hidden name=rundate value='$_POST[rundate]'> <input type=hidden name=event2 value=event2> "; $sq=mysql_query("select * from class_event where rundate like '$_POST[rundate]%' and createdby like '$_POST[createdby]%' and ofshow like '$_POST[ofshow]%' order by class asc")or die(mysql_error()); $results=mysql_num_rows($sq); if($results == "0"){ print "<BR><BR><font size='4pt' face='comic sans ms'>No results.<BR><BR> <input type=button value='←' onClick='history.go(-1)'><BR><BR><BR></font>";include "footer.php"; exit;} print "<input type=button value='←' onClick='history.go(-1)'> <br><br> <b>Horse Participating:</b> #$_POST[hid]<br> <b>Results.</b> (searching rundate <i><u>$_POST[rundate]</u></i>)<br>"; print "<divv style=width:500;height:500;overflow:auto><table style='border:1px;'> <tr><td>"; for($i=0;$i<$results;$i++){ $result=mysql_fetch_array($sq); $skq=mysql_query("select * from class_event_entered where class='$result[class]' and horseid='$_POST[hid]'")or die(mysql_error()); $horses=mysql_num_rows($skq); //if($horses == "1"){$disabled="disabled";} print "<form method=post action=shows.php> <input type=hidden name=event2 value=event2> <input type=hidden name=rundate value=$result[rundate]> <input type=hidden name=ofshow value=$result[ofshow]> <input type=hidden name=horseid value=$_POST[hid]> <input type=hidden name=cid value='$result[class]'> <input type=submit value='Enter' $disabled> Class #$result[class]. Created by: $result[createdby]. Of Show #$result[ofshow]</form>"; } print "</form></div></td></tr></table><br><br>";include "footer.php"; exit; } //end event script //start exp show script if($_POST[enterclass]){ if(empty($_POST[level])){print "<BR><BR><font size='4pt' face='comic sans ms'>You forgot to pick a class! <BR><BR><input type=button value='Back to Class List' onClick='history.go(-1)'><BR><BR><BR></font>";include "footer.php"; exit;} $llq=mysql_query("select * from class_entered where horseid='$_POST[hid]' and classid='$_POST[level]'"); $levell=mysql_fetch_array($llq); if($levell[horseid] == "$_POST[hid]"){ print "<BR><BR><div width='400px'><font face='comic sans ms' size='4pt'>Already entered in this class,<BR> refresh the page to see what classes your horse has entered.<BR><BR> <input type=button value='Back to Class List' onClick='history.go(-1)'></font><br><BR><BR>";include "footer.php";exit;} mysql_query("insert into class_entered ( `classid` , `horseid` , `level`) VALUES ('$_POST[level]','$_POST[hid]','$_POST[enterclass2]')")or die(mysql_error()); $atype='mod'; if($atype == "diamond" || $atype == "Diamond" || $atype == "mod" || $atype == "Mod"){$upexp="2";}else{$upexp="1";} mysql_query("update horsedata set Exp=Exp+'$upexp' where id='$_POST[hid]'"); print "<BR><font size='3pt'><center>Participant horse <b>#$_POST[hid]</b> was entered in to <b>Class id #$_POST[level]</b> in <b>Level $_POST[enterclass2]</b><br><BR> <input type=button value='Back to Class List' onClick='history.go(-1)'></font><BR><BR><BR> ";include "footer.php";exit;} if($_POST[viewclasses]){ //exp shows $lvl="$_POST[level]"; $hid="$_POST[hid]"; $lq=mysql_query("select * from class_level where level='$lvl'"); $lvls=mysql_num_rows($lq); print "<form method=post action=shows.php> <b>Show Type:</b> Experience<br> <b>Horse Participating:</b> #$hid <br> <b>Level:</b> #$lvl <br> <br> <b>Classes in Level: </b>(15 total) <input type=button value='←' onClick='history.go(-1)'> <input type=submit value='→'><br> <sup>Refresh the page to see what classes your horse has entered.</sup><br> "; //if(empty($levls)){print "<BR><BR><font size='4pt' face='comic sans ms'>No classes yet.</font><BR><BR><BR> ";include "footer.php"; exit;} for($i=0;$i<$lvls;$i++){ $level=mysql_fetch_array($lq); $llq=mysql_query("select * from class_entered where horseid='$hid' and classid='$level[id]'"); $levell=mysql_fetch_array($llq); if($hid == $levell[horseid]){ print " <input type=hidden name=hid value='$hid'> <input type=hidden name=enterclass value='$level[id]'> <input type=hidden name=enterclass2 value='$lvl'>"; print "<s>Class -id#$level[id]</s><br>"; }else{ print " <input type=hidden name=hid value='$hid'> <input type=hidden name=enterclass value='$level[id]'> <input type=hidden name=enterclass2 value='$lvl'>"; print "<input type=radio value='$level[id]' name=level>Class -id#$level[id]<br>"; }} include "footer.php";exit;} if($_POST[viewlevels]){ //exp shows $hid="$_POST[hid]"; $hq=mysql_query("select * from horsedata where id='$_POST[hid]'"); $horse=mysql_fetch_array($hq); $exp=$horse[Exp]; print "<form method=post action=shows.php> <input type=hidden name=viewclasses value=viewclasses> <input type=hidden name=hid value=$_POST[hid]> <input type=hidden name=points value=$_POST[points]> <b>Show Type:</b> Experience<br> <b>Horse Participating:</b> #$hid<br> <b>Current Experience Points:</b> $exp<br><br> <b>Your Horses Level:</b><br> <select name=level> "; if($exp == "0" || $exp <= "3704"){print "<option value=1>1 (0-3,704 points)</option>";} if($exp > "3704" && $exp < "6000"){print "<option value=2>2 (3,705-5,999 points)</option>";} if($exp > "5999" && $exp < "9000"){print "<option value=3>3 (6,000-8,999 points)</option>";} if($exp > "8999" && $exp < "11705"){print "<option value=4>4 (9,000-11,704 points)</option>";} if($exp > "11704" && $exp < "14000"){print "<option value=5>5 (11,705-13,999 points)</option>";} if($exp > "13999" && $exp < "16705"){print "<option value=6>6 (14,000-16,704 points)</option>";} if($exp > "16704" && $exp < "19000"){print "<option value=7>7 (16,705-18,999 points)</option>";} if($exp > "18999" && $exp < "22000"){print "<option value=8>8 (19,000-21,999 points)</option>";} if($exp > "21999" && $exp < "23705"){print "<option value=9>9 (22,000-23,704 points)</option>";} if($exp > "23704" && $exp < "26000"){print "<option value=10>10 (23,705-25,999 points)</option>";} if($exp > "25999" && $exp < "28705"){print "<option value=11>11 (26,000-28,704 points)</option>";} if($exp > "28704" && $exp < "35001"){print "<option value=12>12 (28,705-35,000 points)</option>";} if($exp > "35000" && $exp < "40705"){print "<option value=13>13 (35,001-40,704 points)</option>";} if($exp > "40704" && $exp < "61000"){print "<option value=14>14 (40,705-60,999 points)</option>";} if($exp > "60999" && $exp < "78000"){print "<option value=15>15 (61,000-77,999 points)</option>";} if($exp > "779999" && $exp < "87705"){print "<option value=16>16 (78,000-87,704 points)</option>";} if($exp > "87704" && $exp < "100001"){print "<option value=17>17 (88,705-100,000 points)</option>";} if($exp > "100000" && $exp < "220000"){print "<option value=18>18 (100,001-219,999 points)</option>";} if($exp > "219999" && $exp < "630001"){print "<option value=19>19 (220,000-630,000 points)</option>";} if($exp > "630000" && $exp < "999999999999999999"){print "<option value=20>20 (630,001-999,999,999 points)</option>";} if($bob){ print " <option value=1>1 (0-3,704 points)</option> <option value=2>2 (3,705-5,999 points)</option> <option value=3>3 (6,000-8,999 points)</option> <option value=4>4 (9,000-11,704 points)</option> <option value=5>5 (11,705-13,999 points)</option> <option value=6>6 (14,000-16,704 points)</option> <option value=7>7 (16,705-18,999 points)</option> <option value=8>8 (19,000-21,999 points)</option> <option value=9>9 (22,000-23,704 points)</option> <option value=10>10 (23,705-25,999 points)</option> <option value=11>11 (26,000-28,704 points)</option> <option value=12>12 (28,705-35,000 points)</option> <option value=13>13 (35,001-40,704 points)</option> <option value=14>14 (40,705-60,999 points)</option> <option value=15>15 (61,000-77,999 points)</option> <option value=16>16 (78,000-87,704 points)</option> <option value=17>17 (88,705-100,000 points)</option> <option value=18>18 (100,001-219,999 points)</option> <option value=19>19 (220,000-630,000 points)</option> <option value=20>20 (630,001-999,999,999 points)</option>";} print " </select><input type=submit value='Select Level'> </form>"; include "footer.php"; exit;} print "<font color='#46522a'><img src='items/show2.jpg'><BR> <DIV style='width:550px;'><font size='2pt' face='comic sans ms'><center>There are <u>3 types of shows</u>: <i>Experience, Event, and Barn</i> shows. Experience shows are made by the game. Each level contains 15 classes made by the game each day at 12pm PST. Horses that are entered into experience shows gain one experience point per entry or two if the horse's owner is upgraded. Horses will only receive experience points (when the classes run) if they place 1-6th in a class. Event shows are made by upgraded players. Upgraded players can create 3 shows a day (each show contains 5 classes) and choose their run date. Horses gain one point per entry and one experience point per entry if the user is upgraded. Only 6 horses (non-upgraded member's and upgraded member's horses) will place in each class and receive points. Barn shows will remain judged by hand by the game's community.</div><br><BR>"; //exp show horses $hq=mysql_query("select * from horsedata where Owner='$id' AND creature='No' AND DOB > 2 AND DOB < 24 ORDER BY id desc"); $horses=mysql_num_rows($hq); if($horses == "0"){print "<BR><BR><font size='4pt' face='comic sans ms'><center>You need some horses before you can compete in a show.</font><BR><BR>";include "footer.php"; exit;} print "<DIV style='width:400px;text-align:justify;'> <form method=post action=shows.php> <input type=hidden name=viewlevels value=viewlevels> <font size='4pt'><b>Show Type:</b> Experience<br></font> <font size='3pt'><sup>Experience shows are for solely for earning experience points. Each horse has a level based on its experience points.</sup><br></font></div> Select a Horse <br> <select name=hid> "; for($i=0;$i<$horses;$i++){ $horse=mysql_fetch_array($hq); print "<option value=$horse[id]>(#$horse[id]) $horse[Name]</option>"; } print "</select><BR> <input value='Select this Horse' type=submit></form><BR><BR><BR> "; //event show horses $hq=mysql_query("select * from horsedata where Owner='$id' AND creature='No'AND DOB > 2 AND DOB < 24 ORDER BY id desc"); $horses=mysql_num_rows($hq); if($horses == "0"){print "<BR><BR><font size='4pt' face='comic sans ms'><center>You need some horses before you can compete in a show.</font><BR><BR><BR>";include "footer.php"; exit;} print "<BR> <DIV style='width:400px;text-align:justify;'> <form method=post action=shows.php> <input type=hidden name=event1 value=event1> <font size='4pt'><b>Show Type:</b> Event (<a href=create_event.php>click here to create an event show</a>)</font><BR> <font size='3pt'> <sup> Event shows are made by upgraded players. Upgraded players get 2 show points per entry and non-upgraded members will get 1 point for entering, but horses are able to place in 1-6th place.<BR></font> </sup></div> Select a Horse <br> <select name=hid> "; for($i=0;$i<$horses;$i++){ $horse=mysql_fetch_array($hq); print "<option value=$horse[id]>(#$horse[id]) $horse[Name]</option>"; } print "</select>"; print "<br>Type a rundate (i.e: 05-05-2009). <sup>Required</sup><br><input type='text' name='rundate'> <br>Created By. (i.e: 1445). <sup>Optional</sup><br><input type='text' name='createdby'> <br>ShowID# (i.e: 24593). <sup>Optional</sup><br><input type='text' name='ofshow'> <br> <input value='Select and Search' type=submit></form></div></font><BR><BR><BR> "; include "footer.php"; ?>
  5. <?php $assoname=$_GET['assoname']; $assoid=$_GET['assoid']; $sql="SELECT * FROM horsedata LEFT JOIN registration ON registration.horseid = horsedata.id WHERE Owner='$id' AND ISNULL(registration.assoname) GROUP BY horsedata.id"; $result=mysql_query($sql)or die(mysql_error()); while($r=mysql_fetch_array($result)) { $horseid=$r['id']; $name=$r['Name']; $assoid=$_GET['id']; echo "<center> <form action='association_apply.php' method='post'> <input type='hidden' value='$horseid' name='horseid'> <input type='hidden' value='$assoid' name='assoid'> <input type='submit' value='$name'></form> </center> "; }?> <?php include 'header.php'; $sql="INSERT INTO assorequest (horseid, assoid, ownerid) VALUES ('$_POST[horseid]','$_POST[assoid]','$id')"; if (!mysql_query($sql)) { die('You have already submitted a request to this association from this horse'); include 'footer.php'; exit;} echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Registration Request Submitted</b></font><BR><BR>"; ?> <?php include 'footer.php'; ?>
  6. So when i add this functional javascript form button <div style='width:400px;'> <b>WARNING: READ BEFORE YOU CLICK!</B> Only use this button if you want to delete a horse. It will only euthanize horses over the age of 24. Horses with no children will be completely deleted, horses with children will be considered 'dead' but will appear on the retirement page so that it will not affect the foals pedigree. Dead horses on retirement pages will have a little tombstone appear next to their name and you will no longer be able to change their name, picture or horse log, Therefore you want to make sure that you do ultimately want to euthanize this horse. <script type='text/javascript'> <!-- function confirmation() { var answer = confirm('Are you sure you want to euthanize this horse?') if (answer){ alert('This horse has been euthanized.') window.location = 'horse_euth.php?id=<?PHP echo $_GET[id]; ?>'; } else{ alert('I am sure the horse is happy that you didn't kill him/her!') } } //--> </script> <form> <input type='button' onclick='confirmation()' value='Euthanize'> </form> </div> to this portion of php: <?php $horseid=$_GET['id']; $sql="SELECT * FROM horsedata WHERE id='$horseid' and Owner='$id' and brand='none'"; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $horseid=$r["id"]; $horseid2=$r["id"]; $Name=$r["Name"]; $brand=$r["brand"]; echo " <BR><BR><font color='red'> You can only brand your horse once and you are limited to 10 letters/symbols! </font><form name='brand' action='horse_upbrand.php' method='post'> <input type='text' name='brand' MAXLENGTH='10' value='$brand'> <input type='hidden' name='id' value='$horseid2'> <input type='submit' value='Brand your horse!'> </form> FYI: If you want to sell your horse in the future, branding it could make the value of the horse less! <br><br> "; } ?> the button is still there but when you click on it...nothing happens....any ideas?
  7. <?php include 'header.php'; ?> <?php $horseid=$_GET['id']; $sql = "SELECT id from horsedata WHERE id = '$horseid' AND Owner = '$id' AND DOB > 24"; echo "<!-- ".$sql." -->"; $result=mysql_query($sql) or die ( mysql_error ); if(mysql_num_rows($result) > 0){ $sql1 = "SELECT id from horsedata WHERE (Sire = ".$horseid." OR Dam = ".$horseid.")"; echo "<!-- ".$sql1." -->"; $result1= mysql_query($sql1) or die ( mysql_error() ); if(mysql_num_rows($result1) == 0) { $sql = "DELETE FROM horsedata WHERE id = $horseid"; echo "<!-- ".$sql." -->"; $result=mysql_query($sql)or die ( mysql_error() );; echo "You have Euthanized this horse."; } else { $query="UPDATE horsedata SET retired='yes' , dead='yes' WHERE id='$horseid' AND Owner='$id' AND DOB > 24"; echo "<!-- ".$query." -->"; $checkresult = mysql_query($query) or die(mysql_error()); if (mysql_affected_rows()>0) echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Your horse has been retired.</b></font><BR><BR>"; } } else echo "<BR><BR><font size='4pt' face='comic sans ms'><B>This horse is not old enough to be euthanized, or you do not own it.</b></font><BR><BR>"; ?> <?php include 'footer.php'; ?> functioning code.
  8. nope, still hasnt made it say what its supose to when horse doesnt meet requirements
  9. nothing showed up but the header and footer
  10. right now, everything functions BUT the part where if the horse does not meet the owner and DOB requirements, its not posting the 'you dont own this horse or it is not old enough'
  11. the 'owner' id is there so that other players cant 'steal' other peoples horses...because sad to say but it happens on my game haha
  12. it is there <?php include 'header.php'; ?> <?php $horseid=$_GET['id']; $sql = "SELECT id from horsedata WHERE id = '$horseid' AND Owner = '$id' AND DOB > 24"; echo "<!-- ".$sql." -->"; $result=mysql_query($sql) or die ( mysql_error ); if(mysql_num_rows($result) > 0){ $sql1 = "SELECT id from horsedata WHERE (Sire = ".$horseid." OR Dam = ".$horseid.")"; echo "<!-- ".$sql1." -->"; $result1= mysql_query($sql1) or die ( mysql_error() ); if(mysql_num_rows($result1) == 0) { $sql = "DELETE FROM horsedata WHERE id = $horseid"; echo "<!-- ".$sql." -->"; $result=mysql_query($sql)or die ( mysql_error() );; echo "You have Euthanized this horse."; } else { $query="UPDATE horsedata SET retired='yes' , dead='yes' WHERE id='$horseid' AND Owner='$id' AND DOB > 24"; echo "<!-- ".$query." -->"; $checkresult = mysql_query($query) or die(mysql_error()); if (mysql_affected_rows()>0) echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Your horse has been retired.</b></font>"; else echo "<BR><BR><font size='5pt' face='comic sans ms'><B>You do not own this horse or the horse is not old enough to be retired.</b></font>"; } } else { } ?> <?php include 'footer.php'; ?>
  13. dead and retired are both varchar
  14. horse id is from the link, owner id appears to not be defined...but it still works apparently?
  15. that got it functional! but now its not posting : 'You do not own this horse or the horse is not old enough to be retired.' if it doesnt meet the owner = $id and DOB > 24
  16. im not sure what you mean...do you mean what table are they on? or if they are set on a pervious page? im a total php beginner...yet i own a php based site.. :-\
  17. for some reason the portion that says: $query="UPDATE horsedata SET retired='yes' AND dead='yes' WHERE id='$horseid' AND Owner='$id' AND DOB > 24"; is updating to 0 instead of yes...how do I fix this? <?php include 'header.php'; ?> <?php $sql = "SELECT id from horsedata WHERE id = '$horseid' AND Owner = '$id' AND DOB > 24"; echo "<!-- ".$sql." -->"; $result=mysql_query($sql) or die ( mysql_error ); if(mysql_num_rows($result) > 0){ $sql1 = "SELECT id from horsedata WHERE (Sire = ".$horseid." OR Dam = ".$horseid.")"; echo "<!-- ".$sql1." -->"; $result1= mysql_query($sql1) or die ( mysql_error() ); if(mysql_num_rows($result1) == 0) { $sql = "DELETE FROM horsedata WHERE id = $horseid"; echo "<!-- ".$sql." -->"; $result=mysql_query($sql)or die ( mysql_error() );; echo "You have Euthanized this horse."; } else { $query="UPDATE horsedata SET retired='yes' AND dead='yes' WHERE id='$horseid' AND Owner='$id' AND DOB > 24"; echo "<!-- ".$query." -->"; $checkresult = mysql_query($query) or die(mysql_error()); if (mysql_affected_rows()>0) echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Your horse has been retired.</b></font>"; else echo "<BR><BR><font size='5pt' face='comic sans ms'><B>You do not own this horse or the horse is not old enough to be retired.</b></font>"; } } else { } ?> <?php include 'footer.php'; ?>
  18. <?php include 'header.php'; ?> <?php $horseid=$_GET['id']; $sql = "SELECT id FROM horsedata WHERE (Sire = ".$horseid." OR Dam = ".$horseid.") and Owner='$id' and DOB > 24"; $result=mysql_query($sql) or die ( mysql_error ); if(mysql_num_rows($sql) > 0){ $sql = "DELETE FROM horsedata WHERE id = '.$horseid.'"; $result=mysql_query($sql); echo "You have Euthanized this horse."; } else{ $query="UPDATE horsedata SET retired='yes' and dead='yes' WHERE id='$horseid' and Owner='$id' and DOB > 24"; $checkresult = mysql_query($query); if ($checkresult) echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Your horse has been retired.</b></font>"; else echo "<BR><BR><font size='5pt' face='comic sans ms'><B>You do not own this horse/or the horse is not old enough to be retired.</b></font>";} ?> <?php include 'footer.php'; ?>
  19. <?php print " <table border='1' bordercolor='#000000' cellpadding='2' cellspacing='1' height='95' width='505'> <tbody> <td class='top2' Colspan='2' width='120' height='20'>Grade</tr> <tr> <td class='horsetable' valign='middle'> <center><font face='verdana' size='8'> $Grading </td></tr></table>"; ?> </div> <style> -----! <div id="country5" class="tabcontent"> 5 </div> <div id="country6" class="tabcontent"> 6 </div> <div id="country7" class="tabcontent"> 7 </div> <div id="country8" class="tabcontent"> 8 </div> !----- </style> </div> <script type="text/javascript"> var countries=new ddtabcontent("countrytabs") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init() var countries=new ddtabcontent("countrytabs2") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init() </script> </td></tr></table> </div> </div> <div id="flowertabs" class="modernbricksmenu2"> <ul> <li><a href="#" rel="tcontent1">Basic Horse Info</a></li> <li><a href="#" rel="tcontent2">Other Horse Info</a></li> </ul> </div> <br style="clear: left" /> <script type="text/javascript"> var myflowers=new ddtabcontent("flowertabs") myflowers.setpersist(true) myflowers.setselectedClassTarget("link") //"link" or "linkparent" myflowers.init() </script> <?php } ?> <style type="text/css"> body, dd { font-family: verdana; font-size: 11px; text-align:center; } .menu1 { background-color: #646f71; color: #d0c9aa; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } .menu1 a { background-color: #646f71; color: #d0c9aa; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } .menu2 { background-color: #d0c9aa; color: #54505e; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } .menu2 a{ background-color: #d0c9aa; color: #54505e; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } .menu3 { background-color: #babea9; color: #5a5a64; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } .menu3 a { background-color: #babea9; color: #5a5a64; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } #display { border-width: 0px; border-style: none; font-family: geneva, times new roman; font-size: 12px; letter-spacing: 2px; text-align:center; } </style> <script src="http://jquery.com/src/jquery.js"></script> <script> //Toggle function for menu $(document).ready(function(){ //on click hide and display $("dd:not(:first)").hide(); $("dt a").click(function(){ //set the speed of the slide $("dd:visible").slideUp("slow"); $(this).parent().next().slideDown("slow"); return false; }); }); </script> <br><br> <table style="border-width: 1px; border-color:black;"><tr><td width="505px"> <dl> <dt class="menu1"><a href="/"><b>View Registrations</b></a></dt> <dd> <?php $horseid=$_GET['id']; $sql="SELECT * FROM registration WHERE horseid='$horseid'"; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $assoname=$r["assoname"]; echo "<BR>$assoname"; } ?> <br> <br> </dd> <dt class="menu2"><a href="/" ><b>View Awards</a></b></dt> <dd> <?php echo " Awards Won by $Name: <br> $Awards "; ?><br><br> </dd> <dt class="menu3"> <a href="/"><b>View Show Records</a></b></dt> <dd><?php $horseid=$_GET['id']; $sql="SELECT * FROM horsedata WHERE id='$horseid'"; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $Owner=$r["Owner"]; $Name=$r["Name"]; $horseid=$r["id"]; $Height=$r["Height"]; $Breed=$r["Breed"]; $Gender=$r["Gender"]; $Color=$r["Color"]; $Registrations=$r["Registrations"]; $Exp=$r["Exp"]; $Points=$r["Points"]; $Speed=$r["Speed"]; $Scope=$r["Scope"]; $Endurance=$r["Endurance"]; $Power=$r["Power"]; $Obedience=$r["Obedience"]; $Sociability=$r["Sociability"]; $Intelligence=$r["Intelligence"]; $Sire=$r["Sire"]; $Dam=$r["Dam"]; $Foals=$r["Foals"]; $Awards=$r["Awards"]; $Image=$r["Image"]; $Log=$r["Log"]; $DOB=$r["DOB"]; $pedigree=$r["pedigree"]; $legs=$r["legs"]; $temperament=$r["temperament"]; $back=$r["back"]; $neck=$r["neck"]; $head=$r["head"]; $Grading=$r["Grading"]; $Firsts=$r["Firsts"]; $Seconds=$r["Seconds"]; $Thirds=$r["Thirds"]; $Fourths=$r["Fourths"]; $Fifths=$r["Fifths"]; $Sixths=$r["Sixths"]; $Entries=$r["Entries"]; $rabies=$r["rabies"]; $influenza=$r["influenza"]; $strangles=$r["strangles"]; $westnile=$r["westnile"]; $herpes=$r["herpes"]; $tetanus=$r["tetanus"]; $coggins=$r["coggins"]; echo " <br> <b>Show Records for $Name:</b> <br> Firsts: $Firsts | Seconds: $Seconds | Thirds: $Thirds <br> Fourths: $Fourths | Fifths: $Fifths | Sixths: $Sixths <br> Total Entries: $Entries <br><br>"; } ?> <br> <b>Barn Show Results</b> <br><br> <div style="border: 0pt none ; height: 100px; overflow: auto;"> <?php $horseid=$_GET['id']; $sql="SELECT * FROM BarnResults WHERE horseid='$horseid'"; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $horseid=$r["horseid"]; $Place=$r["Place"]; $ClassName=$r["ClassName"]; $barnid=$r["barnid"]; //display the row echo " $Place in $ClassName at $barnid <br> "; } ?> </div><br><br> </dd> <dt class="menu1"> <a href="/"><b>Health Certification</a></b></dt> <dd> <?php $horseid=$_GET['id']; $sql="SELECT * FROM horsedata WHERE id='$horseid'"; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $Owner=$r["Owner"]; $Name=$r["Name"]; $horseid=$r["id"]; $Height=$r["Height"]; $Breed=$r["Breed"]; $Gender=$r["Gender"]; $Color=$r["Color"]; $Registrations=$r["Registrations"]; $Exp=$r["Exp"]; $Points=$r["Points"]; $Speed=$r["Speed"]; $Scope=$r["Scope"]; $Endurance=$r["Endurance"]; $Power=$r["Power"]; $Obedience=$r["Obedience"]; $Sociability=$r["Sociability"]; $Intelligence=$r["Intelligence"]; $Sire=$r["Sire"]; $Dam=$r["Dam"]; $Foals=$r["Foals"]; $Awards=$r["Awards"]; $Image=$r["Image"]; $Log=$r["Log"]; $DOB=$r["DOB"]; $pedigree=$r["pedigree"]; $legs=$r["legs"]; $temperament=$r["temperament"]; $back=$r["back"]; $neck=$r["neck"]; $head=$r["head"]; $Grading=$r["Grading"]; $Firsts=$r["Firsts"]; $Seconds=$r["Seconds"]; $Thirds=$r["Thirds"]; $Fourths=$r["Fourths"]; $Fifths=$r["Fifths"]; $Sixths=$r["Sixths"]; $Entries=$r["Entries"]; $rabies=$r["rabies"]; $influenza=$r["influenza"]; $strangles=$r["strangles"]; $westnile=$r["westnile"]; $herpes=$r["herpes"]; $tetanus=$r["tetanus"]; $coggins=$r["coggins"]; $picked=$r["picked"]; $trimmed=$r["trimmed"]; $conditioned=$r["conditioned"]; $rasp=$r["rasp"]; $shoe=$r["shoe"]; $polish=$r["polish"]; echo " <br> Certificate of Health <br> Rabies Vaccine: $rabies<br> Equine Influenza Vaccine: $influenza <br> Strangles Vaccine: $strangles<br> West Nile Vaccine: $westnile<br> Equine Herpes Vaccine: $herpes <br> Tetanus Vaccine: $tetanus<br> Recent Coggins Test: $coggins<br> Picked Hooves: $picked<BR> Timmed Hooves: $trimmed<BR> Conitioned Hooves: $conditioned<BR> Rasped Hooves: $rasp<BR> Shoed Hooves: $shoe<BR> Polished Hooves: $polish <BR><BR> <br>"; } ?> </dd> <?php $horseid=$_GET['id']; $sql="SELECT * FROM horsedata WHERE id='$horseid' and Owner='$id' "; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $horseid=$r["id"]; $horseid2=$r["id"]; $Name=$r["Name"]; $Log=$r["Log"]; $Forsale=$r["Forsale"]; $Image=$r["Image"]; echo "<dt class='menu2'><a href='/'><b>Care Center</a></b></dt><dd> <font class='page'> <BR>Here you can care for your horse. Caring for your horse everyday will increase his/her trait areas. You can feed, give supplements, groom, tack and exercise your horse. Each care item will give a different number of traits in a different area. No two items give the same trait amount or in the same trait area. <BR>Have fun!<BR><center></font> <form action='horse_care.php' method='get'> <input type='hidden' value='$horseid2' name='horseid'> <input type='submit' value='care center!'> </form></center></dd>"; } ?> <?php $horseid=$_GET['id']; $sql="SELECT * FROM horsedata WHERE id='$horseid' and Owner='$id' "; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $horseid=$r["id"]; $horseid2=$r["id"]; $Name=$r["Name"]; $Log=$r["Log"]; $Forsale=$r["Forsale"]; $Image=$r["Image"]; echo "<dt class='menu3'><a href='/'><b>Update Horse</a></b></dt><DD> <font class='tableheader'> Update Horse's Records </font> <br><br> <font class='page'> Use the forms below to edit your horse's details. <br><br> <b> Change Your Horse's Name </b> <br> <form name='upname' action='horse_upname.php' method='post'> <input type='text' name='Name' MAXLENGTH='50' value='$Name'> <input type='hidden' name='id' value='$horseid2'> <input type='submit' value='Change Name!'> </form> <br><br> <b> Change Your Horse's Image </b> <br> <form name='upimage' action='horse_upimage.php' method='post'> <input type='text' value='$Image' name='Image'> <input type='hidden' value='$horseid2' name='id'> <input type='submit' value='Change Image!'> </form> <br><br> <b> Update Your Horse's Log </b> <br> Horse logs are your horse's own little page. Add images, HTML etc. <br> <form name='uplog' action='horse_uplog.php' method='post'> <textarea cols='40' rows='9' name='Log'> $Log </textarea> <input type='hidden' value='$horseid2' name='id'> <input type='submit' value='Update!'> </form> <br><br> <b> Put This Horse Up for Sale </b> <br> <form action='horse_upsale.php' method='post'> Change Sale Status: <select name='Forsale'> <option> No </option> <option> Yes </option> </select> <br> List Price: <input type='text' name='price'><BR> Minimum You Will Consider: <input type='text' name='lowoffer'> <input type='hidden' value='$horseid2' name='id'> <input type='submit' value='Update Listing'> </form> </center> "; } ?> <?php $horseid=$_GET['id']; $sql="SELECT * FROM horsedata WHERE id='$horseid' and Owner='$id' and brand='none'"; $result=mysql_query($sql); while($r=mysql_fetch_array($result)) { $horseid=$r["id"]; $horseid2=$r["id"]; $Name=$r["Name"]; $brand=$r["brand"]; echo " <BR><BR><font color='red'> You can only brand your horse once and you are limited to 10 letters/symbols! </font><form name='brand' action='horse_upbrand.php' method='post'> <input type='text' name='brand' MAXLENGTH='10' value='$brand'> <input type='hidden' name='id' value='$horseid2'> <input type='submit' value='Brand your horse!'> </form> FYI: If you want to sell your horse in the future, branding it could make the value of the horse less! <br><br> "; } ?> <script type="text/javascript"> <!-- function confirmation() { var answer = confirm("Are you sure you want to euthanize this horse?") if (answer){ alert("This horse has been euthanized.") window.location = "horse_euth.php?id=<?PHP $_GET['id']; ?>"; } else{ alert("I'm sure the horse is happy that you didn't kill him/her!") } } //--> </script> <form> <input type="button" onclick="confirmation()" value="Euthanize"> </form> DO NOT CLICK UNLESS YOU WANT TO DELETE ALL YOUR HORSES! IT IS NOT FUNCTIONAL YET! </dd> </td></tr></table></div> <br><br> <center> <?php include 'footer.php'; ?> </center> <?php include 'header.php'; ?> <?php $horseid=$_GET['id']; $sql = "SELECT id FROM horsedata WHERE Sire = ".$horseid." OR Dam = ".$horseid." and Owner='$id' and DOB > 24"; $result=mysql_query($sql); if(mysql_num_rows($sql) > 0){ $sql = "DELETE FROM horsedata WHERE id = '.$horseid.'"; $result=mysql_query($sql); echo "You have Euthanized this horse."; } else{ $query="UPDATE horsedata SET retired='yes' and dead='yes' WHERE id='$horseid' and Owner='$id' and DOB > 24"; $checkresult = mysql_query($query); if ($checkresult) echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Your horse has been retired.</b></font>"; else echo "<BR><BR><font size='5pt' face='comic sans ms'><B>You do not own this horse/or the horse is not old enough to be retired.</b></font>";} ?> <?php include 'footer.php'; ?>
  20. Alright so I've put together this code on one page: <script type="text/javascript"> <!-- function confirmation() { var answer = confirm("Are you sure you want to euthanize this horse?") if (answer){ alert("This horse has been euthanized.") window.location = "horse_euth.php?id=<?PHP $_GET['id']; ?>"; } else{ alert("I'm sure the horse is happy that you didn't kill him/her!") } } //--> </script> <form> <input type="button" onclick="confirmation()" value="Euthanize"> </form> The above code is funtional but when it goes to the redirect link it doesnt post the id and I cant get part of the code to funtion: <?php include 'header.php'; ?> <?php $horseid=$_GET['id']; $sql = "SELECT id FROM horsedata WHERE Sire = ".$horseid." OR Dam = ".$horseid." and Owner='$id' and DOB > 24"; $result=mysql_query($sql); if(mysql_num_rows($sql) > 0){ $sql = "DELETE FROM horsedata WHERE id = '.$horseid.'"; $result=mysql_query($sql); echo "You have Euthanized this horse."; } else{ $query="UPDATE horsedata SET retired='yes' and dead='yes' WHERE id='$horseid' and Owner='$id' and DOB > 24"; $checkresult = mysql_query($query); if ($checkresult) echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Your horse has been retired.</b></font>"; else echo "<BR><BR><font size='5pt' face='comic sans ms'><B>You do not own this horse/or the horse is not old enough to be retired.</b></font>";} ?> <?php include 'footer.php'; ?> this is what the page says: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/collegh9/public_html/one-stride/horse_euth.php on line 15 Your horse has been retired.
  21. I figured it out! <?php $_POST[Foalcolor]; switch($Foalcolor) { case "Bay": $img = "horsecolors/Bay.jpg";break; case "White": $img = "horsecolors/White.jpg";break; case "Black": $img = "horsecolors/Black.jpg";break; case "Bay Roan": $img = "horsecolors/BayRoan.jpg";break; case "Blue Roan": $img = "horsecolors/BlueRoan.jpg";break; case "Liver Chestnut": $img = "horsecolors/LiverChestnut.jpg";break; case "Chestnut": $img = "horsecolors/Chestnut.jpg";break; case "Grey": $img = "horsecolors/Grey.jpg";break; case "Dapple Grey": $img = "horsecolors/DappleGrey.jpg";break; case "Fleabitten Grey": $img = "horsecolors/FleabittenGrey.jpg";break; case "Dun": $img = "horsecolors/Dun.jpg";break; case "Palomino": $img = "horsecolors/Palomino.jpg";break; case "Red Roan": $img = "horsecolors/RedRoan.jpg";break; case "Piebald": $img = "horsecolors/Piebald.jpg";break; case "Skewbald": $img = "horsecolors/ChestnutPaint.jpg";break; case "Tri-colored": $img = "horsecolors/BayPaint.jpg";break; case "Appaloosa Pattern": $img = "horsecolors/BlackAppaloosa.jpg";break; case "Brindle": $img = "horsecolors/Brindle.jpg";break; case "Buckskin": $img = "horsecolors/Buckskin.jpg";break; case "Champagne": $img = "horsecolors/Champagne.jpg";break; case "Cremello": $img = "horsecolors/Cremello.jpg";break; case "Dunalino": $img = "horsecolors/Dunalino.jpg";break; case "Grulla": $img = "horsecolors/Grulla.jpg";break; case "Perlino": $img = "horsecolors/Perlino.jpg";break; case "Red Dun": $img = "horsecolors/RedDun.jpg";break; case "Silver Dapple": $img = "horsecolors/SilverDapple.jpg";break; default: $img = "";break; } $sql="INSERT INTO horsedata ( Name, Owner, Height, Breed, Gender, Registrations, Exp, Points, Records, Speed, Scope, Power, Obedience, Sociability, Dam, Sire, Foals, Awards, Grading, Hay, Grain, Vet, Shoes, Exercise, Grooming, DOB, Endurance, Intelligence, Color, temperament, legs, back, neck, head, pedigree, Image) VALUES( 'New Foal', '$Owner', '$Height', '$Foalbreed', '$FoalGender', 'Not Registered', '0', '0', 'none', '$FoalSpeed', '$FoalScope', '$FoalPower', '$FoalObedience', '$FoalSociability', '$mare', '$stall', 'None Yet', 'This horse has not won any awards', 'Not Graded', 'No', 'No', 'No', 'No', 'No', 'No', '0', '$FoalEndurance', '$FoalIntelligence', '$Foalcolor', '$FoalTemperment', '$FoalLegs', '$FoalBack', '$FoalNeck', '$FoalHead', '$Pedigree', '".$img."' )"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } echo "Foal Created Successfully with above stats"; ?>
  22. nope, everything works...well as far as i know theres no error? everything but the image inserts...but thats only 1/5 of the entire code... heres the entire code...the first code i posted is at the end of this whole thing <?php //include 'header.php'; include 'databaseconnection.php'; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); //Some variables $minRandPedigree = 12; $maxRandPedigree = 95; $minRand = 10; $maxRand = 98; $foal=$_POST['foalid']; $sql="SELECT * FROM horsedata WHERE id='$foal'"; $result=mysql_query($sql); $mare=trim($_POST['mareid']); $sql="SELECT * FROM horsedata WHERE id='$mare'"; $result=mysql_query($sql); // Mare Info while($r=mysql_fetch_array($result)){ $Height=$r["Height"]; $Owner=$r["Owner"]; $Marebreed=$r["Breed"]; $Marecolor=$r["Color"]; $MareSpeed=$r["Speed"]; $MareScope=$r["Scope"]; $MareEndurance=$r["Endurance"]; $MarePower=$r["Power"]; $MareObedience=$r["Obedience"]; $MareSociability=$r["Sociability"]; $MareIntelligence=$r["Intelligence"]; $MareTemperment=$r["temperament"]; $MareLegs=$r["legs"]; $MareBack=$r["back"]; $MareNeck=$r["neck"]; $MareHead=$r["head"]; $MarePedigree=$r["pedigree"]; $MareFoals=$r["Foals"]; } mysql_query("UPDATE horsedata SET Pregnant = 'No' WHERE id = '$mare'"); $stall=trim($_POST['stallid']); $sql="SELECT * FROM horsedata WHERE id='$stall'"; $result=mysql_query($sql); // Stall Info while($r=mysql_fetch_array($result)){ $id=$r["id"]; $Stallbreed=$r["Breed"]; $Stallcolor=$r["Color"]; $StallSpeed=$r["Speed"]; $StallScope=$r["Scope"]; $StallEndurance=$r["Endurance"]; $StallPower=$r["Power"]; $StallObedience=$r["Obedience"]; $StallSociability=$r["Sociability"]; $StallIntelligence=$r["Intelligence"]; $StallTemperment=$r["temperament"]; $StallLegs=$r["legs"]; $StallBack=$r["back"]; $StallNeck=$r["neck"]; $StallHead=$r["head"]; $StallPedigree=$r["pedigree"]; $StallFoals=$r["Foals"]; } //$Pedigree = round((($MareBack+$StallBack)+($MareNeck+$StallNeck)+($MareLegs+$StallLegs)+($MareHead+$StallHead)+($MareTemperment+$StallTemperment)) / 10); // Last 10 horses $result = mysql_query("SELECT id FROM horsedata order by id DESC LIMIT 10")or die ('cannot select horse info'); $row = mysql_fetch_array($result); $id = $row['id']; $foalid = $id + 1; $newid = $foalid; if($Marebreed == $Stallbreed) { $Foalbreed=$Marebreed; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Araloosa'; }elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Appendix Quarter Horse'; } elseif(($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Alter-Real';} elseif(($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Alter-Real'; } elseif(($Marebreed == 'Lusitano' || $Stallbreed == 'Lusitano') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Alter-Real'; } elseif(($Marebreed == 'Andalusian' || $Stallbreed == 'Lusitano') && ($Marebreed == ' Spanish Arabian' || $Stallbreed == ' Spanish Arabian')){ $Foalbreed='Alter-Real'; } elseif(($Marebreed == 'Alter-Real' || $Stallbreed == 'Alter-Real') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Alter-Real'; } elseif(($Marebreed == 'Alter-Real' || $Stallbreed == 'Alter-Real') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Alter-Real'; } elseif(($Marebreed == 'Alter-Real' || $Stallbreed == 'Alter-Real') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Alter-Real'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'American Cream Draft' || $Stallbreed == 'American Cream Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Ardennais' || $Stallbreed == 'Ardennais')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Clydesdale' || $Stallbreed == 'Clydesdale')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Belgian' || $Stallbreed == 'Belgian')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Percheron' || $Stallbreed == 'Percheron')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Russian Heavy Draft' || $Stallbreed == 'Russian Heavy Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Shire' || Stallbreed == 'Shire')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Spanish Norman' || $Stallbreed == 'Spanish Norman')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Suffolk Punch' || $Stallbreed == 'Suffolk Punch')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Vladimir Heavy Draft' || $Stallbreed == 'Vladimir Heavy Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Shire' || $Stallbreed == 'Shire')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'American Cream Draft' || $Stallbreed == 'American Cream Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Ardennais' || $Stallbreed == 'Ardennais')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Clydesdale' || $Stallbreed == 'Clydesdale')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Belgian' || $Stallbreed == 'Belgian')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Percheron' || $Stallbreed == 'Percheron')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Russian Heavy Draft' || $Stallbreed == 'Russian Heavy Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Shire' || $Stallbreed == 'Shire')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Spanish Norman' || $Stallbreed == 'Spanish Norman')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Suffolk Punch' || $Stallbreed == 'Suffolk Punch')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Vladimir Heavy Draft' || $Stallbreed == 'Vladimir Heavy Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Shire' || $Stallbreed == 'Shire')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Spanish Norman' || $Stallbreed == 'Spanish Norman')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Suffolk Punch' || $Stallbreed == 'Suffolk Punch')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'American Warmblood' || $Stallbreed == 'American Warmblood') && ($Marebreed == 'Vladimir Heavy Draft' || $Stallbreed == 'Vladimir Heavy Draft')){ $Foalbreed='American Warmblood'; } elseif(($Marebreed == 'Arabian' || $Stallbreed == 'Arabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Pintabian' || $Stallbreed == 'Pintabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Anglo-Arabian' || $Stallbreed == 'Anglo-Arabian') && ($Marebreed == 'Pintabian' || $Stallbreed == 'Pintabian')){ $Foalbreed='Anglo-Arabian'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Appaloosa'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Appaloosa'; } elseif(($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred') && ($Marebreed == 'Appendix Quarter Horse' || $Stallbreed == 'Appendix Quarter Horse')){ $Foalbreed='Appendix Quarter Horse'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Appaloosa'; } elseif(($Marebreed == 'Arabian' || $Stallbreed == 'Arabian') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Arabian'; } elseif(($Marebreed == 'Arabian' || $Stallbreed == 'Arabian') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Arabian'; } elseif(($Marebreed == 'Arabian' || $Stallbreed == 'Arabian') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Arabian'; } elseif(($Marebreed == 'Arabian' || $Stallbreed == 'Arabian') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Arabian'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Araloosa'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian')){ $Foalbreed='Azteca'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Azteca' || $Stallbreed == 'Azteca')){ $Foalbreed='Azteca'; } elseif(($Marebreed == 'Azteca' || $Stallbreed == 'Azteca') && ($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian')){ $Foalbreed='Azteca'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Clydesdale' || $Stallbreed == 'Clydesdale')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Friesian' || $Stallbreed == 'Friesian')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Percheron' || $Stallbreed == 'Percheron')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Shire' || $Stallbreed == 'Shire')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Georgian Grande' || $Stallbreed == 'Georgian Grande') && ($Marebreed == 'Friesian' || $Stallbreed == 'Friesian')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Georgian Grande' || $Stallbreed == 'Georgian Grande') && ($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Georgian Grande' || $Stallbreed == 'Georgian Grande') && ($Marebreed == 'Clydesdale' || $Stallbreed == 'Clydesdale')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Georgian Grande' || $Stallbreed == 'Georgian Grande') && ($Marebreed == 'Percheron' || $Stallbreed == 'Percheron')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Georgian Grande' || $Stallbreed == 'Georgian Grande') && ($Marebreed == 'Shire' || $Stallbreed == 'Shire')){ $Foalbreed='Georgian Grande'; } elseif(($Marebreed == 'Irish Draught' || $Stallbreed == 'Irish Draught') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Irish Sport Horse'; } elseif(($Marebreed == 'Irish Sport Horse' || $Stallbreed == 'Irish Sport Horse') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Irish Sport Horse'; } elseif(($Marebreed == 'Irish Draught' || $Stallbreed == 'Irish Draught') && ($Marebreed == 'Irish Sport Horse' || $Stallbreed == 'Irish Sport Horse')){ $Foalbreed='Irish Sport Horse'; } elseif(($Marebreed == 'Irish Draught' || $Stallbreed == 'Irish Draught') && ($Marebreed == 'Connemara' || $Stallbreed == 'Connemara')){ $Foalbreed='Irish Sport Horse'; } elseif(($Marebreed == 'Irish Draught' || $Stallbreed == 'Irish Draught') && ($Marebreed == 'Connemara' || $Stallbreed == 'Connemara')){ $Foalbreed='Irish Sport Horse'; } elseif(($Marebreed == 'Irish Sport Pony' || $Stallbreed == 'Irish Sport Pony') && ($Marebreed == 'Irish Sport Pony' || $Stallbreed == 'Irish Sport Pony')){ $Foalbreed='Irish Sport Horse'; } elseif(($Marebreed == 'Morgan' || $Stallbreed == 'Morgan') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morgan' || $Stallbreed == 'Morgan') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morgan' || $Stallbreed == 'Morgan') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morgan' || $Stallbreed == 'Morgan') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morgan' || $Stallbreed == 'Morgan') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morgan' || $Stallbreed == 'Morgan') && ($Marebreed == 'Morab' || $Stallbreed == 'Morab')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morab' || $Stallbreed == 'Morab') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morab' || $Stallbreed == 'Morab') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morab' || $Stallbreed == 'Morab') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morab' || $Stallbreed == 'Morab') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Morab' || $Stallbreed == 'Morab') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Morab'; } elseif(($Marebreed == 'Kiger Mustang' || $Stallbreed == 'Kiger Mustang') && ($Marebreed == 'Mustang' || $Stallbreed == 'Mustang')){ $Foalbreed='Mustang'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'National Show Horse' || $Stallbreed == 'National Show Horse') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'National Show Horse' || $Stallbreed == 'National Show Horse') && ($Marebreed == 'Saddlebred' || $Stallbreed == 'Saddlebred')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'National Show Horse' || $Stallbreed == 'National Show Horse') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'National Show Horse' || $Stallbreed == 'National Show Horse') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'National Show Horse' || $Stallbreed == 'National Show Horse') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'National Show Horse' || $Stallbreed == 'National Show Horse') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='National Show Horse'; } elseif(($Marebreed == 'Paint' || $Stallbreed == 'Paint') && ($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse')){ $Foalbreed='Paint'; } elseif(($Marebreed == 'Paint' || $Stallbreed == 'Paint') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Paint'; } elseif(($Marebreed == 'Paint' || $Stallbreed == 'Paint') && ($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony')){ $Foalbreed='Paint'; } elseif(($Marebreed == 'Paint' || $Stallbreed == 'Paint') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Pintabian'; } elseif(($Marebreed == 'Paint' || $Stallbreed == 'Paint') && ($Marebreed == 'Pintabian' || $Stallbreed == 'Pintabian')){ $Foalbreed='Pintabian'; } elseif(($Marebreed == 'Pintabian' || $Stallbreed == 'Pintabian') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Pintabian'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Shetland' || $Stallbreed == 'Shetland')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Araloosa' || $Stallbreed == 'Araloosa') && ($Marebreed == 'Shetland' || $Stallbreed == 'Shetland')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Welsh Pony' || $Stallbreed == 'Welsh Pony')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Welsh Cob' || $Stallbreed == 'Welsh Cob')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Mustang' || $Stallbreed == 'Mustang')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa') && ($Marebreed == 'Kiger Mustang' || $Stallbreed == 'Kiger Mustang')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Welsh Pony' || $Stallbreed == 'Welsh Pony')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Shetland' || $Stallbreed == 'Shetland')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Mustang' || $Stallbreed == 'Mustang')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Kiger Mustang' || $Stallbreed == 'Kiger Mustang')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas') && ($Marebreed == 'Thoroughbred' || $Stallbreed == 'Thoroughbred')){ $Foalbreed='Pony of the Americas'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == ' Shagya Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarab' || $Stallbreed == 'Quarab') && ($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarab' || $Stallbreed == 'Quarab') && ($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarab' || $Stallbreed == 'Quarab') && ($Marebreed == 'Arabian' || $Stallbreed == 'Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarab' || $Stallbreed == 'Quarab') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarab' || $Stallbreed == 'Quarab') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarab' || $Stallbreed == 'Quarab') && ($Marebreed == 'Shagya Arabian' || $Stallbreed == 'Shagya Arabian')){ $Foalbreed='Quarab'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Welsh Pony' || $Stallbreed == 'Welsh Pony')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Connemara' || $Stallbreed == 'Connemara')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse') && ($Marebreed == 'Shetland' || $Stallbreed == 'Shetland')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony') && ($Marebreed == 'Welsh Pony' || $Stallbreed == 'Welsh Pony')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony') && ($Marebreed == 'Connemara' || $Stallbreed == 'Connemara')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony') && ($Marebreed == 'Quarter Horse' || $Stallbreed == 'Quarter Horse')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony') && ($Marebreed == 'Pony of the Americas' || $Stallbreed == 'Pony of the Americas')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Quarter Pony' || $Stallbreed == 'Quarter Pony') && ($Marebreed == 'Welsh Pony' || $Stallbreed == 'Welsh Pony')){ $Foalbreed='Quarter Pony'; } elseif(($Marebreed == 'Percheron' || $Stallbreed == 'Percheron') && ($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian')){ $Foalbreed='Spanish Norman'; } elseif(($Marebreed == 'Spanish Norman' || $Stallbreed == 'Spanish Norman') && ($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian')){ $Foalbreed='Spanish Norman'; } elseif(($Marebreed == 'Percheron' || $Stallbreed == 'Percheron') && ($Marebreed == 'Spanish Norman' || $Stallbreed == 'Spanish Norman')){ $Foalbreed='Spanish Norman'; } elseif(($Marebreed == 'Friesian' || $Stallbreed == 'Friesian') && ($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian')){ $Foalbreed='Warlander'; } elseif(($Marebreed == 'Warlander' || $Stallbreed == 'Warlander') && ($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian')){ $Foalbreed='Warlander'; } elseif(($Marebreed == 'Friesian' || $Stallbreed == 'Friesian') && ($Marebreed == 'Warlander' || $Stallbreed == 'Warlander')){ $Foalbreed='Warlander';} elseif(($Marebreed == 'Akhal Teke' || $Stallbreed == 'Akhal Teke') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Nez Perce';} elseif(($Marebreed == 'Andalusian' || $Stallbreed == 'Andalusian') && ($Marebreed == 'Paint' || $Stallbreed == 'Paint')){ $Foalbreed='Azteca';} elseif(($Marebreed == 'Arabian' || $Stallbreed == 'Arabian') && ($Marebreed == 'Ploish Arabian' || $Stallbreed == 'Polish Arabian')){ $Foalbreed='Arabian';} elseif(($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian') && ($Marebreed == 'Polish Arabian' || $Stallbreed == 'Polish Arabian')){ $Foalbreed='Arabian';} elseif(($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Arabian';} elseif(($Marebreed == 'Straight Egyptian Arabian' || $Stallbreed == 'Straight Egyptian Arabian') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Arabian';} elseif(($Marebreed == 'Polish Arabian' || $Stallbreed == 'Polish Arabian') && ($Marebreed == 'Russian Arabian' || $Stallbreed == 'Russian Arabian')){ $Foalbreed='Arabian';} elseif(($Marebreed == 'Polish Arabian' || $Stallbreed == 'Polish Arabian') && ($Marebreed == 'Spanish Arabian' || $Stallbreed == 'Spanish Arabian')){ $Foalbreed='Arabian';} elseif(($Marebreed == 'Paso Fino' || $Stallbreed == 'Paso Fino') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Tiger Horse';} elseif(($Marebreed == 'Peruvian Paso' || $Stallbreed == 'Peruvian Paso') && ($Marebreed == 'Appaloosa' || $Stallbreed == 'Appaloosa')){ $Foalbreed='Tiger Horse';} else{ $Foalbreed="$Marebreed x $Stallbreed"; } echo"$Foalbreed"; ?> <br><br> <?php $sql="SELECT * FROM colour WHERE coloura='$Stallcolor' and colourb='$Marecolor' ORDER BY RAND() limit 0,1 "; $result=mysql_query($sql); while($r=mysql_fetch_array($result)){ $Foalcolor=$r["result"]; echo"$Foalcolor"; } $sql="SELECT * FROM gender ORDER BY RAND() limit 0,1 "; $result=mysql_query($sql); while($r=mysql_fetch_array($result)){ $FoalGender=$r["gender"]; echo"$FoalGender"; } $number1 = $MareSpeed + $StallSpeed; $FoalSpeed = $number1 / 8; echo"$FoalSpeed"; $number1 = $MareScope + $StallScope; $FoalScope= $number1 / 8; echo"$FoalScope"; $number1 = $MareEndurance + $StallEndurance; $FoalEndurance = $number1 / 8; echo"$FoalEndurance"; $number1 = $MarePower + $StallPower; $FoalPower = $number1 / 8; echo"$FoalPower"; $number1 = $MareTemperment + $StallTemperment; if($number1 == ''){ $FoalTemperment = rand($minRand,$maxRand); }else{ $FoalTemperment = $number1 / 8; } echo"$FoalTemperment"; $number1 = $MareObedience + $StallObedience; $FoalObedience = $number1 / 8; echo"$FoalObedience"; $number1 = $MareSociability + $StallSociability; $FoalSociability = $number1 / 8; echo"$FoalSociability"; $number1 = $MareIntelligence + $StallIntelligence; $FoalIntelligence= $number1 / 8; echo"$FoalIntelligence"; $number1 = $MareTemperment + $StallTemperment; if($number1 == ''){ $FoalTemperment = rand($minRand,$maxRand); echo 'rand'; }else{ $FoalTemperment=round( $number1 / 2 ); echo 'round'; } echo"<p>FoalTemp: $FoalTemperment</p>"; $number1 = $MareLegs + $StallLegs; if($number1 == ''){ $FoalLegs = rand($minRand,$maxRand); }else{ $FoalLegs=round( $number1 / 2 ); } echo"<p>FoalLegs: $FoalLegs"; $number1 = $MareBack + $StallBack; if($number1 == ''){ $FoalBack = rand($minRand,$maxRand); }else{ $FoalBack=round( $number1 / 2 ); } echo"<p>FoalBack: $FoalBack"; $number1 = $MareHead + $StallHead; if($number1 == ''){ $FoalHead = rand($minRand,$maxRand); }else{ $FoalHead=round( $number1 / 2 ); } echo"<p>FoalHead: $FoalHead"; $number1 = $MareNeck + $StallNeck; if($number1 == ''){ $FoalNeck = rand($minRand,$maxRand); }else{ $FoalNeck=round( $number1 / 2 ); } echo"<p>FoalNeck: $FoalNeck"; ?> <br><br> <?php // Horse New Pedigree //$number = $MarePedigree + $StallPedigree; //if($number == '' || $MarePedigree == '' || $StallPedigree == ''){ //$Pedigree = rand($minRandPedigree,$maxRandPedigree); //}else{ //$Pedigree =round( $number / 6 ); $Pedigree = round((($MareBack+$StallBack)+($MareNeck+$StallNeck)+($MareLegs+$StallLegs)+($MareHead+$StallHead)+($MareTemperment+$StallTemperment)) / 10); //} //$Pedigree = round(((97+73)+(91+32)+(93+82)+(21+69)+(54+46)) / 10); echo"<p>Pedigree: $Pedigree</p>"; if ($MarePedigree and $StallPedigree == '0' ); $random_number = rand(10,95); echo"$random_number"; ?> <?php $color = $_POST[Foalcolor]; switch($color) { case "Bay": $img = "horsecolors/Bay.jpg";break; case "White": $img = "horsecolors/White.jpg";break; case "Black": $img = "horsecolors/Black.jpg";break; case "Bay Roan": $img = "horsecolors/BayRoan.jpg";break; case "Blue Roan": $img = "horsecolors/BlueRoan.jpg";break; case "Liver Chestnut": $img = "horsecolors/LiverChestnut.jpg";break; case "Chestnut": $img = "horsecolors/Chestnut.jpg";break; case "Grey": $img = "horsecolors/Grey.jpg";break; case "Dapple Grey": $img = "horsecolors/DappleGrey.jpg";break; case "Fleabitten Grey": $img = "horsecolors/FleabittenGrey.jpg";break; case "Dun": $img = "horsecolors/Dun.jpg";break; case "Palomino": $img = "horsecolors/Palomino.jpg";break; case "Red Roan": $img = "horsecolors/RedRoan.jpg";break; case "Piebald": $img = "horsecolors/Piebald.jpg";break; case "Skewbald": $img = "horsecolors/ChestnutPaint.jpg";break; case "Tri-colored": $img = "horsecolors/BayPaint.jpg";break; case "Appaloosa Pattern": $img = "horsecolors/BlackAppaloosa.jpg";break; case "Brindle": $img = "horsecolors/Brindle.jpg";break; case "Buckskin": $img = "horsecolors/Buckskin.jpg";break; case "Champagne": $img = "horsecolors/Champagne.jpg";break; case "Cremello": $img = "horsecolors/Cremello.jpg";break; case "Dunalino": $img = "horsecolors/Dunalino.jpg";break; case "Grulla": $img = "horsecolors/Grulla.jpg";break; case "Perlino": $img = "horsecolors/Perlino.jpg";break; case "Red Dun": $img = "horsecolors/RedDun.jpg";break; case "Silver Dapple": $img = "horsecolors/SilverDapple.jpg";break; default: $img = "";break; } $sql="INSERT INTO horsedata ( Name, Owner, Height, Breed, Gender, Registrations, Exp, Points, Records, Speed, Scope, Power, Obedience, Sociability, Dam, Sire, Foals, Awards, Grading, Hay, Grain, Vet, Shoes, Exercise, Grooming, DOB, Endurance, Intelligence, Color, temperament, legs, back, neck, head, pedigree, Image) VALUES( 'New Foal', '$Owner', '$Height', '$Foalbreed', '$FoalGender', 'Not Registered', '0', '0', 'none', '$FoalSpeed', '$FoalScope', '$FoalPower', '$FoalObedience', '$FoalSociability', '$mare', '$stall', 'None Yet', 'This horse has not won any awards', 'Not Graded', 'No', 'No', 'No', 'No', 'No', 'No', '0', '$FoalEndurance', '$FoalIntelligence', '$Foalcolor', '$FoalTemperment', '$FoalLegs', '$FoalBack', '$FoalNeck', '$FoalHead', '$Pedigree', '".$img."' )"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } echo "Foal Created Successfully with above stats"; ?>
  23. I just was able to have someone solve my last issue that was VERY similar to this but now I need to figure out why its not inserting the image. I used the same code, which should have worked and I've changed all the right variables...that I can tell but its not working :/ <?php $color = $_POST[Foalcolor]; switch($color) { case "Bay": $img = "horsecolors/Bay.jpg";break; case "White": $img = "horsecolors/White.jpg";break; case "Black": $img = "horsecolors/Black.jpg";break; case "Bay Roan": $img = "horsecolors/BayRoan.jpg";break; case "Blue Roan": $img = "horsecolors/BlueRoan.jpg";break; case "Liver Chestnut": $img = "horsecolors/LiverChestnut.jpg";break; case "Chestnut": $img = "horsecolors/Chestnut.jpg";break; case "Grey": $img = "horsecolors/Grey.jpg";break; case "Dapple Grey": $img = "horsecolors/DappleGrey.jpg";break; case "Fleabitten Grey": $img = "horsecolors/FleabittenGrey.jpg";break; case "Dun": $img = "horsecolors/Dun.jpg";break; case "Palomino": $img = "horsecolors/Palomino.jpg";break; case "Red Roan": $img = "horsecolors/RedRoan.jpg";break; case "Piebald": $img = "horsecolors/Piebald.jpg";break; case "Skewbald": $img = "horsecolors/ChestnutPaint.jpg";break; case "Tri-colored": $Image = "horsecolors/BayPaint.jpg";break; case "Appaloosa Pattern": $img = "horsecolors/BlackAppaloosa.jpg";break; case "Brindle": $img = "horsecolors/Brindle.jpg";break; case "Buckskin": $img = "horsecolors/Buckskin.jpg";break; case "Champagne": $img = "horsecolors/Champagne.jpg";break; case "Cremello": $img = "horsecolors/Cremello.jpg";break; case "Dunalino": $img = "horsecolors/Dunalino.jpg";break; case "Grulla": $img = "horsecolors/Grulla.jpg";break; case "Perlino": $img = "horsecolors/Perlino.jpg";break; case "Red Dun": $img = "horsecolors/RedDun.jpg";break; case "Silver Dapple": $img = "horsecolors/SilverDapple.jpg";break; default: $img = "";break; } $sql="INSERT INTO horsedata ( Name, Owner, Height, Breed, Gender, Registrations, Exp, Points, Records, Speed, Scope, Power, Obedience, Sociability, Dam, Sire, Foals, Awards, Grading, Hay, Grain, Vet, Shoes, Exercise, Grooming, DOB, Endurance, Intelligence, Color, temperament, legs, back, neck, head, pedigree, Image )VALUES( 'New Foal', '$Owner', '$Height', '$Foalbreed', '$FoalGender', 'Not Registered', '0', '0', 'none', '$FoalSpeed', '$FoalScope', '$FoalPower', '$FoalObedience', '$FoalSociability', '$mare', '$stall', 'None Yet', 'This horse has not won any awards', 'Not Graded', 'No', 'No', 'No', 'No', 'No', 'No', '0', '$FoalEndurance', '$FoalIntelligence', '$Foalcolor', '$FoalTemperment', '$FoalLegs', '$FoalBack', '$FoalNeck', '$FoalHead', '$Pedigree', '".$img."' )"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } echo "Foal Created Successfully with above stats"; ?>
  24. thank you so much! I think this quarter at my college im going to take a php class because that was a pretty basic thing i didnt know right?
  25. That code came up with: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_CASE or T_DEFAULT or '}' in /home/collegh9/public_html/one-stride/horse_reg2.php on line 17
×
×
  • 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.