Jump to content

james13009

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

james13009's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Im doing a website for a friend and i need to password protect one page of it. It doesn't need any fancy login, and there will be only ever one user name and password. (which may need changing but not very often). Where can i find the a simple basic script like this. Not sure where to start. Many thanks
  2. many thanks for the answers, all very helpfull. Last one worked a treat so a BIG thanks to DarkPrince2005
  3. Im am still trying to master this, all i want to do is: 1: Person fills out an online form 2: Form gets emailed to me --(which i can do)-- 3: All i want now is for this form to included some html for example a picture, so i can just print it off. I been told i need to echo it but am unsure on how to do this because the message is encapsulated the the varible $message. Im sure this is simple but im just having trouble please help. Right my code: This is just the contact form i am using <table width="400" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td><strong>Contact Form </strong></td> </tr> </table> <table width="400" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td><form name="form1" method="post" action="send_contact.php"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="16%">Subject</td> <td width="2%">:</td> <td width="82%"><input name="subject" type="text" id="subject" size="50"></td> </tr> <tr> <td>Detail</td> <td>:</td> <td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td> </tr> <tr> <td>Name</td> <td>:</td> <td><input name="name" type="text" id="name" size="50"></td> </tr> <tr> <td>Email</td> <td>:</td> <td><input name="customer_mail" type="text" id="customer_mail" size="50"></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td> </tr> </table> </form> </td> </tr> </table> And now for the script; ############### Code <?php // Contact subject $subject ="$subject"; // Details $message="$detail"; // Mail of sender $mail_from="$customer_mail"; // From $header="from: $name <$mail_from>"; // Enter your email address $to ='someone@somewhere.com'; $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email // display message "We've recived your information" if($send_contact){ echo "We've recived your contact information"; } else { echo "ERROR"; } ?> Many thanks James
  4. if the message variable is this: $message="$detail"; how do i eco that inside?
  5. Please help, My boss is ask me to setup a sample request form. I’m am trying to set up form where customers can request a sample online. From a form that will look similar to this: http://www.polymax.co.uk/Main%20Pages/Samples-Form.htm With the data collected i then want it to email me what the customer has requested, and i ideally want a html formatted email to look similar to this so I can just print it out: http://www.polymax.co.uk/Main%20Pages/Sample_Template.htm With the fields filled in with the customers input. At the moment I have found various contact us forms Pre-made which I can get to work but I cannot format how the email looks. To be honest PHP is not my strong point and not really sure where to start Any help appreciated, Thanks James
  6. im currently designing a website with using styleSwap.js javascript, it swaps over the stylesheets the users preferance. (so the user get a choice of different colour backgrounds e.t.c) demo here:( http://www.nationalspares.co.uk/index.php ) And select a colour (top right) then click channels button My problem is though: I select a swapsheets the cookie remembers the stylesheet i that i want fine. But it always loads the default stylesheet first from the CSS <link> tags and when it gets to the <body onload="loads-User-stylesheet"> for example it finally loads the one the user selected. So the user sees the old stylesheet and then the one they wanted (ie the page loads twice) Is there anyway i can stop this. maybe move the onload="loadstylesheet" above the CSS <link> tags? for example but how and where too???? anyway too see my problem click here: http://www.nationalspares.co.uk/index.php And select a colour from the top left then click channels button Many thanks James
  7. thank you very much, lifesaver. It work great! Though i do think its odd that solution is: <a href="javascript:PlayerpopUp(\''.$item['nsstream'].'\')"> i would have assumed it would be <a href="javascript:PlayerpopUp('\'.$item['nsstream'].'\')"> or <a href="javascript:PlayerpopUp(\".$item['nsstream']."\)"> or do these work as well? Just odd to me Thanks again.
  8. This is my code: <a href="javascript:PlayerpopUp(''.$item['nsstream'].'')"> and this is my problems the '.$item['nsstream'].' is calling up an item in the style sheet and must have ' (single quote marks around it) (this item is a link) The javascript is calling a popup link and must put the url in ' (single quote marks) Yet PHP won't let me put '' (two side by side quote marks) without calling an error. I am only a novice at PHP but can anyone help me, what am i doing wrong? James
  9. Im using the above technologies to read feeds, i just need some help with my php coding, this is what i have that works, it reads the first 5 items in an xml feed: <?php include('../../Rss/chart2Rss/rss_fetch.inc');// Set error reporting for this error_reporting(E_ERROR);// Fetch RSS feed $rss = fetch_rss('http://www.nationalspares.co.uk/XML/rss3.xml'); if ($rss) { // Split the array to show first 5 $items = array_slice($rss->items, 0, 5); // Cycle through each item and echo foreach ($items as $item ) { echo '<li><a href="'.$item['link'].'">'.$item['title'].'</a> - '.$item['author'].'</li>'; }}else { echo '<h2>Error:</h2><p>'.magpie_error().'</p>';}// Restore original error reporting value@ini_restore('error_reporting'); ?> But what i really want it to do is to only select items within the feed with certain content, for example only select the items which have the category as "Hits" , in the feed here: http://www.nationalspares.co.uk/XML/rss3.xml So what im looking for is a 'where' statement, any help appreciated Thanks in advance James
×
×
  • 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.