Jump to content

chris_davidsonuk

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chris_davidsonuk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am creating a music website. Users must be verified by the admin before their songs are published on the site. I have 2 tables: [b]USERS[/b] - Username - Status (This is set to 1 if verified 0 if not) [b]TRACKS[/b] - Username I am wanting to query the database and show the tracks (from the tracks table) by users that have been verified (taken from the users table). I have looked at many tutorials but can't get this to word. Does anybody know the correct syntax for this query? Any help much appreciated.
  2. I am using login script I found at http://www.free2code.net/plugins/articles/read.php?id=99. It uses 'DIE' to stop the script when a username or password is incorrect. The problem I am having is that I have my menu at the bottom of the page which I include into the page. But if the user dosn't enter the correct username and password the script is terminated so the menu doesn't show. [code] if(!$_POST['uname'] | !$_POST['passwd']) { die('You did not fill in a required field.<br>'); } [/code] Is there anyway to include my footer file (footer.php) even if the script has 'DIED' ?
  3. On one of my pages I have 2 forms. I use  if ($_POST) { to activate the form. The problem is that both forms submit when either of the forms are submitted. Is there any way I can make it so that each form is triggered seperately? You can see what I mean at: [url=http://www.wemustdesign.com/contact.php]http://www.wemustdesign.com/contact.php[/url] [code] <?php         if ($_POST)         {             $contact_name = $_POST['contact_name'];             $contact_mail = $_POST['contact_mail']; $contact_phone = $_POST['contact_phone']; $contact_enquiry = $_POST['contact_enquiry'];                       $message = "Message from $contact_name \n\nE-Mail:$contact_mail\n\n$contact_phone \n\nTelephone:\n\n$contact_phone\n\nEnquiry:\n\n$contact_enquiry";                         mail("chris@emustdesign.com", "Contact Form Submitted", $message);                         echo " <fieldset> <legend>Enquiry Form Submitted</legend> <br /> <span class='required'>Thankyou for your enquiry. I will get back to you as soon as possible.</span> <br /> - Chris Davidson <br /> <br /> </fieldset>" ;         }         else         {   $ledgend = "Enquiry Form <span class= 'required'>(Required *)</span> ";       ?>   <form name="" method="post" action="<?= $PHP_SELF ?>">   <fieldset>   <legend><? echo "$ledgend" ?></legend> <br /> <label for="contact_name">Name <span class= "required">*</span></label> <input type="text" value="" name="contact_name"  id="contact_name"/> <br /> <label for="contact_mail">Email Address <span class= "required">*</span></label> <input type="text"  value="" name="contact_mail"  id="contact_mail"/> <br /> <label for="contact_phone">Telephone:</label> <input type="text"  value="" name="contact_phone"  id="contact_phone"/><br /> <label for="contact_enquiry">Enquiry <span class= "required">*</span></label> <textarea name="contact_enquiry"  id="contact_enquiry"></textarea><br /> <br />     <input type="submit" title="Submit callback request" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" name="Submit" value="Submit" /> </fieldset>   </form>           <?php         }         ?> [/code]
  4. I have a form which is quite long. I have split it up into 3 parts but I only want to use only one file instead of posting the answers between 3 files. For example: - The file is called mortgage.php - The first part of the form would be mortgage.php?stage=1 - When all of stage 1 of the form has been completed they would go to mortgage.php?stage=2 What I can't figure out? - When the user has submitted the form at stage 1 how would I change the url to mortgage.php?stage=2 - Would I still have to $_POST the results of each stage if all the information is taken within the same file? Any guidance would be appricated!
  5. I have 2 little questions if anyone can answer them think this is css. When I make a table 100% why dosn't it stretch right to the edge? Also how do I get a table to be at the very top of the page as there is a gap normally? Thanks in advance!
  6. If I was you I wouldn't use images that aren't yours you could get into trouble. Let me guess, for that little kid scratching his head you typed confused into google images? Hey, I am not the Internet Pollice I am just talking out of experience, and people don't like you taking their content. For cheap images I use [a href=\"http://www.dreamstime.com\" target=\"_blank\"]http://www.dreamstime.com[/a] where images are $1. You can't say fairer then that.
×
×
  • 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.