Jump to content

Witzbold

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

About Witzbold

  • Birthday 06/25/1982

Contact Methods

  • Website URL
    http://www.jimguckinshow.com

Profile Information

  • Gender
    Male
  • Location
    Philadelphia, Pa

Witzbold's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I want to do something with PHP and MySQL and I am not sure if it is even possible or if I just have hit a wall in what I know. I have a survey page that I am setting up, and I want a page where I can see what the most popular anwser is. For example I have a field called gender, and I want to display to most popular gender, with the field income, I want to display the most popular income option...is there a way to do this?
  2. I redesigned my site... what do you think? First time I based a site completely off PHP and MYSQL www.JimGuckinShow.com
  3. I have to admit I have come a far way in PHP and MySQL, but with this problem I have stepped outside my understanding. I have a field in my SQL database that stores the original date that an mp3 was recorded and is stored in the date type in MySQL (YYYY-MM-DD) and so far I have just been displaying the date this way on the page, because I havn't been able to figure out a solution. I want the information stored in database to display in MMM-DD-YYY format (MAR 20 2008) is there anyway to do this in code, without having to completely redo the code?
  4. That worked, that you very much. I knew it was something simple, guess I just need to dive more into context so I don't make that mistake again!
  5. Hi, I am new to coding PHP and using MySQL I am designing a page to display some information from a database onto the page. I have tried to figure out this problem before asking for help, but I think I've come to a standstill with my knowledge. I am trying to get a section of code to changed depending on the active field. If the field is set to 1 (active) I want a player link and a download link, if the active field is 0 (unactive) I want only [Archived] to appear. Example: If Active=1 John Urban Show (show date) [PLAYER LINK][DOWNLOAD LINK] Show desription If Active=0 John Urban Show (show date) [archived] Show desription <?php include 'connect.php'; $query = "SELECT show_num, orig_date, show_desc, filename, active FROM `show` WHERE year=2008" ; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo "John Urban Show #{$row['show_num']} ({$row['orig_date']});" if({$row['active']}=1 { echo "[<a href=\"http://myurl.com/pc/{$row['filename']}\">Download Show</a>] [<a href=\"http://myurl.com/player.php?id={$row['show_num']}\">Listen in Player</a>] <br>" . } echo "[Archived]<br>" . echo "Show Descript : {$row['show_desc']} <br><br>"; } ?> I am pretty sure that this probably isn't hard, but with being as new with programing with this as I am, I can't figure this out, any help would be greatly appreciated.
×
×
  • 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.