Jump to content

FloridaNutz

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

FloridaNutz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think i'm looking for a java code or a php code that will be able to upload/resize/thumbnail/and store images into mySQL database...  I don't need a complicated file storing system because i need to intergrate it into my system I already have...
  2. It didn't work... I don't quite understand how this for each command works... then again i'm dead tired too lol
  3. [code] example from sql would be $wenMaleAge = "18+" and $thurFemaleAge = "Teen" $daysMale = array("$monMaleAge", "$tueMaleAge", "$wedMaleAge", "$thuMaleAge", "$friMaleAge", "$satMaleAge", "$sunMaleAge");   $daysFemale = array("$monFemaleAge","$tueFemaleAge","$wedFemaleAge","$thuFemaleAge","$friFemaleAge","$satFemaleAge","$sunFemaleAge"); $daysImage = array('<img src="images/Mteen.gif" width="21" height="18" />', '<img src="images/M18.gif" width="21" height="18" />', '<img src="images/F18.gif" width="21" height="18" />', '<img src="images/M21.gif" width="21" height="18" />', '<img src="images/F21.gif" width="21" height="18" />)'); $ages = array("Teen", "18+", "21+"); $agesCounter = 0; $daysCounter= 0; while ($agesCounter < 3) { while ($daysCounter < 7) { if ( $daysMale[$agesCounter] == $ages[$agesCounter] ) { $daysMaleImage[$daysCounter] = $daysImage[$daysCounter] ; }; if ( $daysFemale[$daysCounter] == $ages[$agesCounter] ) { $ageFemaleImage[$daysCounter] = $daysImage[$daysCounter] ; }; $daysCounter++; }; $agesCounter++; }; }; [code] echo $ageMaleImage; $wenMaleAge = <img src="images/M18.gif" width="21" height="18" /> echo $ageFemaleImage; $thurFemaleAge = <img src="images/FTeen.gif" width="21" height="18" /> That's what I have got so far but... still doesn't work [/code][/code]
  4. Sorry, here's what i need to be done... [code] $days = array(mon, tues, wed, thu, fri, sat, sun); $possibleAges = array(18+, 21+, Teen); if ( $monMaleAge == "Teen" ) { $monMaleAge = '<img src="images/Mteen.gif" width="21" height="18" />'; } ; [/code] That's what it's supposed to do... but with everyday in the week and females too...
  5. Ok, i'm designing a website that has a sql datebase like this (as Saved in SQL) monMaleAge = Teen monFemaleAge = Teen tueMaleAge = 18+ tueFemaleAge = 18+ wedMaleAge = 21+ wedFemaleAge = 21+... I also have corresponding images... MTeen.gif, M18.gif, M21.gif, FTeen.gif... How can I convert the "Teen" or "18+" to [code]<img src="images/Mteen.gif" width="21" height="18" /> <img src="images/F18.gif" width="21" height="18" /> [/code] *Edit* I think I need to do an array, but not really sure how... [code]$days = array(mon, tues, wed, thu, fri, sat, sun);[/code]
  6. sorry, typo [code]$sql = "SELECT * FROM $table_name WHERE barName='$barAreaM'";[/code] I have no idea why I put barName instead of barArea.... too much time infornt of the computer... Fixed it
  7. ok, i changed [code]$sql = "SELECT * FROM $table_name WHERE barName=$barAreaM"; to $sql = "SELECT * FROM $table_name WHERE barName='$barAreaM'";[/code] but now I get no bars at all...
  8. [code]<? //access the database $barAreaM = "$_GET[barMenu]"; $db_name = "cfuf"; $table_name = "dso_bars"; $connection = @mysql_connect("+++", "+++", "+++") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection) or die(mysql_error()); $sql = "SELECT * FROM $table_name WHERE barName=$barAreaM"; $result = @mysql_query($sql, $connection) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $barArea = $row['barArea']; $UCF_id = $row['UCF_id']; $barName = stripslashes($row['barName']); $barPhone = stripslashes($row['barPhone']); $barAddress = stripslashes($row['barAddress']); $barVIP = stripslashes($row['barVIP']); $barCity = stripslashes($row['barCity']); $barZip = stripslashes($row['barZip']); $barComments = stripslashes($row['barComments']); $barKey = stripslashes($row['barKey']); $barKey = unserialize($row['barKey']); $view = '<a href="../bar/do_viewbar.php?id='. $UCF_id. '"> <img src="../images/search.png" width="16" height="16" border="0"></a>'; $edit = '<a href="../bar/edit_bar.php?id='. $UCF_id. '"> <img src="../images/edit.png" width="16" height="16" border="0"></a>'; $delete = '<a href="../bar/delete_confirm.php?id='. $UCF_id. '"><img src="../images/delete.png" width="16" height="16" border="0"></a>'; $display_block .= "<p><strong>$barName:</strong> $barAddress, $barCity $barZip<br>   Phone: $barPhone  VIP Line: $barVIP $view $edit $delete</p><br>     <strong>Bar Key:</strong> $barKey[0] $barKey[1] $barKey[2] $barKey[3] $barKey[4] $barKey[5] $barKey[6] $barKey[7] $barKey[8]<br> $barKey[9] $barKey[10] $barKey[11] $barKey[12]<hr />"; } ?> <html> <head> <title>View Bars</title> </head> <body> <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img src="../images/admin_head.gif" width="380" height="51" /></font><a href="../admin_main.html"><img src="../images/Menu.png" width="94" height="32" border="0"></a></p> <hr /> <span class="Heading"><strong class="Heading"><font color="#B5BFCC" size="6" face="Verdana, Arial, Helvetica, sans-serif">Orlando </font><font color="#B5BFCC" size="6" face="Verdana, Arial, Helvetica, sans-serif">Area<br> </font></strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br> <br> <? echo "$display_block"; ?></font> </body> </html> [/code] This is how I would get all the bars before [code] $sql = "SELECT * FROM $table_name ORDER BY UCF_id";[/code]
  9. Ok, I have a page where I can edit the entries I have and it works fine.  I think the problem is that there is multiple entries that will have UCF as their area...  I want the sql to go through and only display the bars in that area [code] $idm = $_GET[id]; $sql = "SELECT * FROM $table_name WHERE UCF_id=$idm";[/code] but when I try to bring up only a certain area of bars I get an error [code] $barAreaM = "$_GET[barMenu]"; $sql = "SELECT * FROM $table_name WHERE barName=$barAreaM";[/code] Unknown column 'UCF' in 'where clause'
  10. I have my mySQL on my server and I want to host the HTML on a diffrent server, is that possible?
  11. I think I might be able to fix this if I could make some sort of an array to make it add each of the selections and then be able to brake them back down later.... barKey= "/bar /club /pool /lm"
  12. I don't think this is what i ment... Add Bar: Name of Bar = $barName Things that describe the bar  =  $barKey [ ] bar  [x] club  [ ] live music i have two tables DSO_bars                              DSO_key --------------                        -------------- $barName = "x"                        keyID = 1  keyDescription = Bar  keyImage = bar.gif $barPhone = "555-5555"                        2                        Club                  club.gif $barKey = ???                                    3                          Live Music          livemusic.gif i tried serializing, but couldn't get it to work I already have a form that fills in all those areas, including checkboxes that adds the entries just like for mentioned.  I just want to be able to use the same form as submited before to come up when you edit the bar again, which i pretty much have except for the check boxes. This is how I got my former drop down menus... [code]<select name="monFemaleAge">                       <option value="">-- Select One--</option>                       <?     $ages = array("Teen","18+","21+");     foreach($ages as $val) { $chk = $val==$monFemaleAge ? 'selected' : '';         echo "<option value='$val' $chk> $val</option>"; } ?>                     </select>[/code]
  13. I love you. Seriously. I pretty much learned everything I could about PHP in two days and built an entire admin system and I think my head is going to explode.  The only two things i need left is the Key system and a way to sort tables...
  14. update: I was wondering if it would be better to create a table in mySQL since i'm going to be associating images with those keys as well... keyID - keyDescription - keyImage 1 - Bar - bar.png 2 - Club - club.png
  15. i'm not sure I started this right then... add_bar.php (simplified) [code] <form method="POST" action="do_addbar.php"> <label><input type='checkbox' name='barKey[]' id='Bar' value='Bar' /> Bar</label>               Bar               <label><input type='checkbox' name='barKey[]' id='Club' value='Club' /> Bar</label>               Club<br> <input type="submit" name="submit" value="Add Bar" /> </form> [/code] do_addbar.php (simplified) [code] $barKeyOut = serialize($_POST['barKey']); $sql = "INSERT INTO $table_name ) VALUES ('$barKeyOut')"; [/code] this is where i get confused on how i am going to unserialize and take that info and fill in the checkboxes...
×
×
  • 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.