Jump to content

danmaxito

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

danmaxito's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey guys I am currently doing a project for a client (can't go into to much detail than that) He wants me to create a schedule of his upcoming shows. Each show will go away on the next day after the show, and the next schedule will role up and be bold. So here is what I have: <?php $satShowHours = " - 06:00AM, 06:26AM"; $sunShowHours = " - 08:00AM, 08:26AM"; // These are the dates $schedule = array ( "sched1"=>"Sat Jul 26, 2008", "sched2"=>"Sun Jul 27, 2008", "sched3"=>"Thu Aug 02, 2008", "sched4"=>"Thu Aug 03, 2008", "sched5"=>"Thu Aug 09, 2008", "sched6"=>"Thu Aug 10, 2008", "sched7"=>"Thu Aug 16, 2008", "sched8"=>"Thu Aug 17, 2008", "sched9"=>"Thu Aug 23, 2008", "sched10"=>"Thu Aug 24, 2008", "sched11"=>"Thu Aug 30, 2008", "sched12"=>"Thu Aug 31, 2008", "sched13"=>"Thu Sep 06, 2008", "sched14"=>"Thu Sep 07, 2008", "sched15"=>"Thu Sep 13, 2008", "sched16"=>"Thu Sep 14, 2008", "sched17"=>"Thu Sep 20, 2008", "sched18"=>"Thu Sep 21, 2008", ); //DO NOT EDIT BELOW THIS LINE if ( strtotime("now") > strtotime("26 July 2008") ) echo ""; else echo $schedule['sched1'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("27 July 2008") ) echo ""; else echo $schedule['sched2'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("02 August 2008") ) echo ""; else echo $schedule['sched3'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("03 August 2008") ) echo ""; else echo $schedule['sched4'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("09 August 2008") ) echo ""; else echo $schedule['sched5'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("10 August 2008") ) echo ""; else echo $schedule['sched6'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("16 August 2008") ) echo ""; else echo $schedule['sched7'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("17 August 2008") ) echo ""; else echo $schedule['sched8'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("23 August 2008") ) echo ""; else echo $schedule['sched9'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("24 August 2008") ) echo ""; else echo $schedule['sched10'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("30 August 2008") ) echo ""; else echo $schedule['sched11'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("31 August 2008") ) echo ""; else echo $schedule['sched12'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("06 September 2008") ) echo ""; else echo $schedule['sched13'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("07 September 2008") ) echo ""; else echo $schedule['sched14'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("13 September 2008") ) echo ""; else echo $schedule['sched15'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("14 September 2008") ) echo ""; else echo $schedule['sched16'] . $sunShowHours; echo "</br>"; if ( strtotime("now") > strtotime("20 September 2008") ) echo ""; else echo $schedule['sched17'] . $satShowHours; echo "</br>"; if ( strtotime("now") > strtotime("21 September 2008") ) echo ""; else echo $schedule['sched18'] . $sunShowHours; ?> I am sure there is a better way to do this, but I have no idea what? Here is my problem. When I load this it ignore the "</br>". And, I have no idea how to tell the first one to be bold, and then when it leaves, then next one is bold etc etc. I am not sure if I calculated the time right either. The other thing is that instead of disappearing and letting the next date role up, it adds a "<br>"... aarggg. Maybe I need to get some sleep..lol Your help is greatly appreciated Danmaxito
  2. I am not sure what gateway he is using yet.... I'll find out and then post it here . Thanks for the quick reply!!!
  3. Hi everyone, I am working on another PHP project with a custom Admin CP. The problem that I am having is that my client want a payment system that I am not familiar with as far as coding it. His site is a custom CD making site. The payment system that he wants is as follows: 1. A person will go to his site and go to the order page 2. On the order page, the person needs to register and then must make a small payment in order to continue (Example - $25) 3. Once payment is made, the person will now go through a few steps to customize their CD (image to print on cd, color, amount, etc) 4. After the person is done going through the steps, his order is then placed. 5. After a few days when his CD's are done, he will make a full payment, and the CD's will be shipped to him. I get stuck on step 2 - where a small payment must be made before continuing with the process, because how will the site know that a payment was made? Any advice, recommendations, etc? Thanks Danmaxito
  4. Nevermind. I had a misspelling in my code :) It all works now. THANKS EVERYONE!! Danny
  5. thorpe, I appreciate all your help. If at anytime, I am bugging you, let me know. Here is another problem that I am not understanding: I set everything to run smoothly. User goes to webpage, selects his name, and a session is then created with the users info. Once the users goes back to the homepage, his previous session is destroyed, and he is asked for is name again. Why is it destroying the session when it was not instructed to do so??? I created an if statement on the home page that says, "If a session is created, then tell them that they are logged in as Freddy(Example) and give them the option to continue as Freddy, or to destroy the session and log in as someone else.
  6. I guess so... I tried it, and it seems to be working fine. Danny
  7. ok, thanks. I will modify my code then. - On another note - Can I do something like this: [code] switch ($name) {       case 'Freddy':       $age = 4;       $state = "FL";       $gender = "Male";             break;[/code] Thanks Danny
  8. Awesome! Thanks guys for your help. As I was putting this code together (before I posted it here) I used the SWITCH method. I just wrote the code incorrectly, and since I am new to PHP, I was curious if I was doing things wrong. Thorpe - I used your code (Thanks by the way), but I had to edit some of the code for it to work: I changed [code]$name = isset($_POST['name']) : $_POST['name'] ? '';[/code] to [code]$name = $_POST["name"];[/code] Am I doing something wrong here? Danny
  9. Hey guys, Problem: I have an html form that has a dropdown list. When the user click on a name from the dropdown list and hits submit, the name is stored in a session. Now, I am trying to write some php code that says: If name = Freddy   then $age = 4 elseif name = Alex   then $age = 6 elseif name = Derek   then $age = 2 How would I go about in doing this? Thanks Danny
  10. THANK YOU VERY MUCH! The information you gave me sure did help. I even was abe to put extra features on the page. Thanks again :) Danmaxito
  11. Hello, Lets see if I can explain this one... Here goes... OK, I have a page that lists several categories (from a MySQL DB). When you click on one of the categories, you see a list of articles that pertain to that category. This is all connected with: cat_Id, cid, and art_Id. Here is what I am trying to do: Once you click on one of the categories, I want the new page that loads with the list of articles, to display what category the viewer is currently in. IN OTHER WORDS... For example: I will go to the site, click on a category, and on the new page that loads, I will see a line of text the says "You are currently in the *cat_name* category section", then I will see a list of articles. What code should I use to get the category's name? Thanks a million!!!! Danmaxito
  12. GREAT!!! Thanks.. Now that I have it limited to 2, what PHP code do I use to display the first "event" in one location of the front-end, and the second "event" on another location of the front-end. THANKS A LOT GUYS!!! Danmaxito
  13. Hello PHP Freaks, I have a MySQL database set up with a table that holds "Events". Using PHP, the "Events" are then shown on the webpage in thre *categories and sorted by date (not the date that the "Event" was created, but the date the the admin set for the "Event" to take place). * the 3 categories are: "Upcoming Events", "Todays Events", and "Past Events". When an "Event's" date is past the current date, then it gets puched to the "Past Events" Category etc. Now the problem I am having, is: On the front end of the site, I want to only show the 2 most current "Events", in a way that they will update everytime, and will never show "Past Events". And the option to show more than 2 will be nice. It sounds so simple to do, yet I can't figure it out.... maybe I am not thinking right today. Thanks in advance Danmaxito
×
×
  • 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.