Jump to content

Scott87

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Scott87's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Heres the story: We have a website which allows users to upload adverts. There is a section which displays 'latest adverts'. This is at random and displays around 30 adverts. However there is one user who has quite a few adverts and thus because of that almost always comes up at the top. Any ideas on how to select all users from the database and limit them to only having 3/4 adverts displaying at any one time.
  2. I have a booking form, which once submitted does it thing and displays a thank you page. However I want this thank you page to include payment options based on what selection the user chose on the booking form. E.g. Name Address (Dropdown Choice) Yellow Green Submit If the user choose Yellow on the drop down, submits the form, it takes them to a thank you page with a Google checkout button which will then handle payment for Yellow drop down. If the user chooses Green on the drop down it does exactly the same as above but displays the Google checkout button for the Green payment. i'm guessing If and Else statements would be the way forward but apart from that and a few failed attempts at it that's where I'm at. Any ideas?
  3. I have php file which displays images based on what the page name is in the URL. the code is: <?php $rightbox = array( 'faqs' => '_img/faqanswers.jpg', 'contact-us' => '_img/contactsuccessful.jpg', 'login' => '_img/loginexperience.jpg', ); $page = isset($_GET['page']) ? $_GET['page'] : 'home'; // default to home page echo "<img src=\"{$rightbox[$page]}\" />"; ?> I'm trying to add more images to each section, like so: $rightbox = array( 'faqs' => '_img/faqanswers.jpg', 'contact-us' => '_img/contactsuccessful.jpg', '_img/contactpotential.jpg', '_img/contactwinner.jpg', 'login' => '_img/loginexperience.jpg', ); Obviously without any luck, how would I go about inserting the extra images into the code? Cheers
  4. Thanks for that. if($page == 'contact-us','login','faqs'){ //show righthand images include('_inc/rightsection2.inc.php'); } else { //use the facts box include('_inc/rightsection.inc.php') } Didn't work but Gevans code did, thanks again. Scott
  5. Alright cheers, i'll have a go.
  6. At the moment i'm doing it by saying : <?php if($page == 'contact-us'){ include('_inc/rightsection2.inc.php'); } ?> <?php if($page == 'login'){ include('_inc/rightsection2.inc.php'); } ?> <?php if($page == 'faqs'){ include('_inc/rightsection2.inc.php'); } ?> <?php include('_inc/rightsection.inc.php') ?> In rightsection2.inc.php I have an include along with some other xhtml stuff. The include is to rightbox.inc.php which has: <?php $rightbox = array( 'faqs' => '_img/faqanswers.jpg', 'contact-us' => '_img/contactsuccessful.jpg', 'login' => '_img/loginexperience.jpg', ); $page = isset($_GET['page']) ? $_GET['page'] : 'home'; // default to home page echo "<img src=\"{$rightbox[$page]}\" />"; ?> The images are working fine, however i still have the normal include of: <?php include('_inc/rightsection.inc.php') ?> Being displayed, I need to show it on all pages except the contact-us - faqs and login area. If i can hide this include only on those three pages everything should work fine.
  7. the *insert thing*? Just kidding I'm having a bit of a struggle coming up with a solution - it's probably a simple thing and i'm just totally useless and should know better but basically this is it: I've got a site which is ran through a CMS, the CMS generates pages from the index.php template. I want to change a few things on some pages. E.g. I have a right 'Facts box' on the index.php (which obviously displays on every page due to the template). However on the contact page I want an image to display here in place of the facts box. Any ideas? Thanks in advance.....
  8. Hey, thanks for that - I should use debugging to my advantage! This is the message I get when using the debugging code you gave me:
  9. Not sure whether this is the right section to post this into (I couldn't see a MYSQL help section). I have a form: Once completed and submitted it processes confirm.php which has an include of brochurerequest.php - this is where my code for the form is. I've set (at least I think I have) the database table/fields up correctly. But the information doesn't go into the database as it should. Any ideas - i'm quite new to mysql/php so forgive me if its a mess ! Thanks Scott
  10. Just join up here so I'd like to say HI. I'm currently a PHP beginner so I won't pretend to understand stuff I'm learning and know the basics so far but I'm having a bit of a dilemma: I currently have a banner image, which is static on each page. The pages are generated via a CMS / PHP etc. I want to change the banner image on each page, so e.g. Home - img1, About - img2, Contact - img3 etc. Whats the best way to do this?
×
×
  • 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.