Jump to content

ben3001

Members
  • Posts

    213
  • Joined

  • Last visited

Posts posted by ben3001

  1. Hey guys,I'm trying to find a solution to my ratings script problem.At the moment I have a simple thumbs up and down script which posts +1 in the corresponding field (votes_up or votes_down). The only security I have at the moment preventing the user from voting numerous times is a cookie is set with the commentID. I then have a statement that: if cookie is set, then do not display voting thumbs. This is my temporary solution but i'm sure there is another way.Is it possible to post many values into one field in a mysql database seperated by commas?The idea I have is that when the user votes their user id is posted into the user_vote field along with all the other id's that have voted seperated by commas.If is possible then I would have a script that searchs each userid, and if there isn't a match then display voting form.Have you got any suggestions?CheersB

  2. Hi Guys long time,I have a little problem here i have a project in for tomorrow and my group have let me down.I need a music player that loads all mp3 files that are in a folder.I have seen some where you have to specify the folder you want in the place list (in the xml file), but this is not what i need. It has to display all the files in that folder.Im really a little anoyed becuase at the last minute my mates said they couldnt get anything to work.Any help is really appreacited This is one examplehttp://www.premiumbeat.com/flash_resources...player_menu.phpBut you have to have direct url, as shown in the below xml file

    <?xml version="1.0" encoding="UTF-8"?><xml>	<track>		<path>samples/</path>		<title>Track 1 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 2 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 3 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 4 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 5 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 6 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 7 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 8 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 9 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 10 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 11 - Track Title</title>	</track>	<track>		<path>song.mp3</path>		<title>Track 12 - Track Title</title>	</track></xml>

    Ben

  3. considering he asked for a url he could download them from, im guessing he means monospaced fonts
    Well smartalco others also seem to think his question is also unclear, thus I made an assumption, as to which you cannot judge until Amit replies. I have simply tried to clarify what he is asking and although I may be wrong, your comment is irrelevant to the question asked and has no purpose! Possibly you should wait for his reply instead of being certain. .
  4. 3. Take a look at some templates and change your color schemeSorry, the colors are my client's choice. The client likes it, and client's always right !
    As the designer of a site you should be the one who has a flare for design and creativity. You should prehaps suggest to the client these colours are not appealing to the site because...Its better to say now at the start rather than leaving it till the end.
  5. As i understand it, you want to remove the menu that appears when you right click. To be honest it is pointless in trying. If someone wants to get an image from your site they will!For example in firefox right click a page and select View Page Info. Then select media. Here you can download evey image displayed on the site.

  6. Sorry but i dont really understand what i must do.this is the code i have for the captcha field

    <tr>		<td>Verification Code</td>		<td><br /><img src="verify.php" alt="captcha" /><a href="design.php?num=1">Refresh </a><br />Enter the verification code as it is shown in the box above.<br />				<input id="cpt" name="captcha" type="text" size="10" maxlength="5" />'; if( $incorrectCaptcha) print " <span style='color:#FF0000'> Invalid code. Try again!</span>"; print '</td>		</tr>

  7. so how do other captchas work? currently the only way i have of refreshing the captcha is by pressing a button that refreshes the whole page, however, this obviously looses the data inputted into the form

  8. I have found where i didnt close it, it was on line 56, now im back to where the form submits regardless of the captcha.

    <?php$name=$_POST['Name'];$Email=$_POST['Email'];$Comment=$_POST['Comment'];$Subject=$_POST['subject'];$counter=0;require_once('recaptchalib.php');// Get a key from [url="http://recaptcha.net/api/getkey"]http://recaptcha.net/api/getkey[/url]$publickey = "6LcFHwAAAAAAAFyCHo-h-t65VHyvye-yL9VDhFtY";$privatekey = "6LcFHwAAAAAAAE22y6Z62EprK2oyTg9NNjGVl07h";# the response from reCAPTCHA$resp = null;# the error code from reCAPTCHA, if any$error = null;function printit(){global $publickey;if ( isset ($_POST['submit'])){$incorrectCustomer="";$incorrectEmail="";$incorrectDate="";$incorrectComment="";if($_POST['Name']==null){$incorrectCustomer="<span style='color:#FF0000'> * Required</span>";}else{$incorrectCustomer="";}if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['Email'])){$incorrectEmail="";}else{$incorrectEmail="<span style='color:#FF0000'> * Required</span>";}if($_POST['Comment']==null){$incorrectComment="<span style='color:#FF0000'> * Required</span>";}else{$incorrectComment="";}}if ($_POST["recaptcha_response_field"]) {$resp = recaptcha_check_answer ($privatekey,$_SERVER["REMOTE_ADDR"],$_POST["recaptcha_challenge_field"],$_POST["recaptcha_response_field"]);}if ($resp->is_valid) {echo "You got it!";} else {# set the error code so that we can display it$error = $resp->error;}echo recaptcha_get_html($publickey, $error);print '<span class=style4>Enquires</span><p>Problem with the site? Need more information? Complete the form below,if you have entered your email address correctly you should recieve an automated reply confirmingyour query has been recieved . All emails are replied to within 24 hours.</p><script language="JavaScript"><!--document.myForm.myField.disabled=true;//--></script><form name="Contact Us" action="design2.php" method="post"><table style= width="100%" border="0" cellpadding="3" cellspacing="1"><tr><td width="20%"><p align="left">Website design regarding:</p></td><td width="80%"><input class="border" type="text" disabled onFocus="if (this.disabled) this.blur()" name="subject" size="35" maxlength="100" value="http://www.aquatic-management.org""' . $_POST['subject'] . '"/>';print '</td></tr><tr><td width="20%">Name:</td><td width="80%"><input class="border" type="text" name="Name" size="25" maxlength="35" value="' . $_POST['Name'] . '" />';print "$incorrectCustomer";print '</td></tr><tr><td>Email:</td><td><input class="border" type="text" name="Email" size="35" maxlength="100" value="' . $_POST['Email'] . '"/>';print "$incorrectEmail";print '</td></tr><tr><td>Enquiry</td><td><textarea class="border" name="Comment" rows="3" cols="41">' . $_POST['Comment'] . '</textarea>';print "$incorrectComment";print '</td></tr><tr><td>Verification:</td><td>' . recaptcha_get_html($publickey, $error) . '</td></tr><table border="0" width="100%"><tr><td width="100%"><input type="submit" name="submit" value="Send" /> <input type="reset" name="Reset" value="Reset" /></td></tr></table></form></table>';}if ( isset ($_POST['submit'])){$validEmail=true;$validNumber=true;if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)){ }else{$validEmail=false;}if(($name==null)||($validEmail==false)||($Comment==null)){print"";printit();}else{ mail("b_e_n04@hotmail.com","Website Design: [url="http://www.aquatic-management.org",""]http://www.aquatic-management.org","[/url]From: $nameEmail Address: $EmailMessage: $Comment","From:$Email");mail("$Email","Auto Reply Website Design: [url="http://www.aquatic-management.org",""]http://www.aquatic-management.org","[/url]Dear: $nameThank you for contacting me regarding [url="http://www.aquatic-management.org"]http://www.aquatic-management.org[/url]. Your enquiry is shown below.'$Comment'I attempt to respond to all emails with in 24 hours however, due to busy times this may take longer.Once again thank-you for your enquiry.Ben Davies","From:b_e_n04@hotmail.com");print "<span class=style4>Thank you for your enquiry</span><br><p>Comments are always welcomed and replied to within 2-3 days.</br></font><p>The email you sent is shown below, you should of received an email confirming I have recieved your enquiry:</p><strong><p>Website design regarding:</strong> [url="http://www.aquatic-management.org<p/>"]http://www.aquatic-management.org<p/>[/url]<strong><p>Name:</strong> $name<p/><strong><p>Email address:</strong> $Email</p><strong><p>Enquiry:</strong> $Comment</p>";}}else { // Display the form.printit();}?>

  9. now ive got a new error in removing that

    Parse error: syntax error, unexpected $end in /content/StartupHostPlus/a/q/aquatic-management.org/web/cap/design2.php on line 187
    note line 187 is
    ?>

  10. i've added the code in the part where it gets executed when the form gets submitted but ive recieved this message

    Parse error: syntax error, unexpected T_ELSE in /content/StartupHostPlus/a/q/aquatic-management.org/web/cap/design2.php on line 67
    <?php         $name=$_POST['Name'];$Email=$_POST['Email'];$Comment=$_POST['Comment'];$Subject=$_POST['subject'];$counter=0;require_once('recaptchalib.php');// Get a key from [url="http://recaptcha.net/api/getkey"]http://recaptcha.net/api/getkey[/url]$publickey = "6LcFHwAAAAAAAFyCHo-h-t65VHyvye-yL9VDhFtY";$privatekey = "6LcFHwAAAAAAAE22y6Z62EprK2oyTg9NNjGVl07h";# the response from reCAPTCHA$resp = null;# the error code from reCAPTCHA, if any$error = null;function printit(){  global $publickey;if ( isset ($_POST['submit'])){$incorrectCustomer="";$incorrectEmail="";$incorrectDate="";$incorrectComment="";if($_POST['Name']==null){$incorrectCustomer="<span style='color:#FF0000'> * Required</span>";}else{$incorrectCustomer="";}if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['Email'])){$incorrectEmail="";} else {$incorrectEmail="<span style='color:#FF0000'> * Required</span>";}if($_POST['Comment']==null){$incorrectComment="<span style='color:#FF0000'> * Required</span>";}else{$incorrectComment="";}}if ($_POST["recaptcha_response_field"]) {        $resp = recaptcha_check_answer ($privatekey,                                        $_SERVER["REMOTE_ADDR"],                                        $_POST["recaptcha_challenge_field"],                                        $_POST["recaptcha_response_field"]);        if ($resp->is_valid) {                echo "You got it!";        } else {                # set the error code so that we can display it                $error = $resp->error;        }                echo recaptcha_get_html($publickey, $error);else {}print '<span class=style4>Enquires</span>        <p>Problem with the site? Need more information? Complete the form below,         if you have entered your email address correctly you should recieve an automated reply confirming         your query has been recieved . All emails are replied to within 24 hours.</p><script language="JavaScript"><!--document.myForm.myField.disabled=true;//--></script><form name="Contact Us" action="design2.php" method="post"><table style= width="100%" border="0" cellpadding="3" cellspacing="1"><tr><td width="20%"><p align="left">Website design regarding:</p></td><td width="80%"><input class="border" type="text" disabled onFocus="if (this.disabled) this.blur()" name="subject" size="35" maxlength="100" value="http://www.aquatic-management.org""' . $_POST['subject'] . '"/>';print  '</td></tr><tr><td width="20%">Name:</td><td width="80%"><input class="border" type="text" name="Name" size="25" maxlength="35" value="' . $_POST['Name'] . '" />';print "$incorrectCustomer";print '</td> </tr><tr><td>Email:</td><td><input class="border" type="text" name="Email" size="35" maxlength="100" value="' . $_POST['Email'] . '"/>';print "$incorrectEmail";print '</td></tr><tr><td>Enquiry</td><td><textarea class="border" name="Comment" rows="3" cols="41">' . $_POST['Comment'] . '</textarea>';print "$incorrectComment";print '</td></tr><tr>  <td>Verification:</td>  <td>' . recaptcha_get_html($publickey, $error) . '</td>  </tr><table border="0" width="100%">  <tr>      <td width="100%"><input type="submit" name="submit" value="Send" /> <input type="reset" name="Reset" value="Reset" /></td>  </tr></table></form></table>';}if ( isset ($_POST['submit'])) {$validEmail=true;$validNumber=true;if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)){  }else {$validEmail=false;}if(($name==null)||($validEmail==false)||($Comment==null)) {    print"";printit();}else   {      mail("b_e_n04@hotmail.com","Website Design: [url="http://www.aquatic-management.org",""]http://www.aquatic-management.org","[/url]From: $name Email Address: $Email     Message: $Comment","From:$Email");mail("$Email","Auto Reply Website Design: [url="http://www.aquatic-management.org",""]http://www.aquatic-management.org","[/url]Dear: $nameThank you for contacting me regarding [url="http://www.aquatic-management.org"]http://www.aquatic-management.org[/url]. Your enquiry is shown below. '$Comment'I attempt to respond to all emails with in 24 hours however, due to busy times this may take longer.Once again thank-you for your enquiry.Ben Davies","From:b_e_n04@hotmail.com");  print "<span class=style4>Thank you for your enquiry</span>   <br><p>Comments are always welcomed and replied to within 2-3 days.</br></font><p>The email you sent is shown below, you should of received an email confirming I have recieved your enquiry:</p>     <strong><p>Website design regarding:</strong> [url="http://www.aquatic-management.org<p/>"]http://www.aquatic-management.org<p/>[/url]<strong><p>Name:</strong> $name<p/><strong><p>Email address:</strong> $Email</p>  <strong><p>Enquiry:</strong> $Comment</p>        ";  }} else {       // Display the form.printit();}?>

  11. Were are nearly there justsomeguy.the captcha form displays however, it seems as there is no point to it as you can just submit the form as normal without filling the captcha out and the form will submit.if you do enter the captcha it just prints You got it! and submits the form.@geekygirl thanks for the tut ill keep that in mind when im next thinking of doing another captcha.

  12. Now its performing as i have the incorrect api key, i definately have the right one.

    <?php 		$name=$_POST['Name'];$Email=$_POST['Email'];$Comment=$_POST['Comment'];$Subject=$_POST['subject'];$counter=0;require_once('recaptchalib.php');// Get a key from [url="http://recaptcha.net/api/getkey"]http://recaptcha.net/api/getkey[/url]$publickey = "6LcFHwAAAAAAAFyCHo-h-t65VHyvye-yL9VDhFtY";$privatekey = "6LcFHwAAAAAAAE22y6Z62EprK2oyTg9NNjGVl07h";# the response from reCAPTCHA$resp = null;# the error code from reCAPTCHA, if any$error = null;function printit(){if ( isset ($_POST['submit'])){$incorrectCustomer="";$incorrectEmail="";$incorrectDate="";$incorrectComment="";if($_POST['Name']==null){$incorrectCustomer="<span style='color:#FF0000'> * Required</span>";}else{$incorrectCustomer="";}if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['Email'])){$incorrectEmail="";} else {$incorrectEmail="<span style='color:#FF0000'> * Required</span>";}if($_POST['Comment']==null){$incorrectComment="<span style='color:#FF0000'> * Required</span>";}else{$incorrectComment="";}}else {}print '<span class=style4>Enquires</span>        <p>Problem with the site? Need more information? Complete the form below, 		if you have entered your email address correctly you should recieve an automated reply confirming 		your query has been recieved . All emails are replied to within 24 hours.</p><script language="JavaScript"><!--document.myForm.myField.disabled=true;//--></script><form name="Contact Us" action="design2.php" method="post"><table style= width="100%" border="0" cellpadding="3" cellspacing="1"><tr><td width="20%"><p align="left">Website design regarding:</p></td><td width="80%"><input class="border" type="text" disabled onFocus="if (this.disabled) this.blur()" name="subject" size="35" maxlength="100" value="http://www.aquatic-management.org""' . $_POST['subject'] . '"/>';print  '</td></tr><tr><td width="20%">Name:</td><td width="80%"><input class="border" type="text" name="Name" size="25" maxlength="35" value="' . $_POST['Name'] . '" />';print "$incorrectCustomer";print '</td> </tr><tr><td>Email:</td><td><input class="border" type="text" name="Email" size="35" maxlength="100" value="' . $_POST['Email'] . '"/>';print "$incorrectEmail";print '</td></tr><tr><td>Enquiry</td><td><textarea class="border" name="Comment" rows="3" cols="41">' . $_POST['Comment'] . '</textarea>';print "$incorrectComment";print '</td></tr><tr>  <td>Verification:</td>  <td>' . recaptcha_get_html($publickey, $error) . '</td>  </tr><table border="0" width="100%">  <tr>      <td width="100%"><input type="submit" name="submit" value="Send" /> <input type="reset" name="Reset" value="Reset" /></td>  </tr></table></form></table>';}if ($_POST["recaptcha_response_field"]) {        $resp = recaptcha_check_answer ($privatekey,                                        $_SERVER["REMOTE_ADDR"],                                        $_POST["recaptcha_challenge_field"],                                        $_POST["recaptcha_response_field"]);        if ($resp->is_valid) {                echo "You got it!";        } else {                # set the error code so that we can display it                $error = $resp->error;        }				echo recaptcha_get_html($publickey, $error);}if ( isset ($_POST['submit'])) {$validEmail=true;$validNumber=true;if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)){  }else {$validEmail=false;}if(($name==null)||($validEmail==false)||($Comment==null)) {    print"";printit();}else   {      mail("b_e_n04@hotmail.com","Website Design: [url="http://www.aquatic-management.org",""]http://www.aquatic-management.org","[/url]From: $name Email Address: $Email	 Message: $Comment","From:$Email");mail("$Email","Auto Reply Website Design: [url="http://www.aquatic-management.org",""]http://www.aquatic-management.org","[/url]Dear: $nameThank you for contacting me regarding [url="http://www.aquatic-management.org"]http://www.aquatic-management.org[/url]. Your enquiry is shown below. '$Comment'I attempt to respond to all emails with in 24 hours however, due to busy times this may take longer.Once again thank-you for your enquiry.Ben Davies","From:b_e_n04@hotmail.com");  print "<span class=style4>Thank you for your enquiry</span>   <br><p>Comments are always welcomed and replied to within 2-3 days.</br></font><p>The email you sent is shown below, you should of received an email confirming I have recieved your enquiry:</p>     <strong><p>Website design regarding:</strong> [url="http://www.aquatic-management.org<p/>"]http://www.aquatic-management.org<p/>[/url]<strong><p>Name:</strong> $name<p/><strong><p>Email address:</strong> $Email</p>  <strong><p>Enquiry:</strong> $Comment</p>        ";  }} else {       // Display the form.printit();}?>

  13. it doesn't seem to have the captcha on it. although im greatful the code is cleaner.Even with me have the required fields the spam bot manages to fill in everything perfectly

  14. This is from one of the local radio stages in London

    If you live abroad you might have noticed a bit of a change with our player. This has happened because of a change in the way we are allowed by the music industry to stream on the Internet.Capital 95.8 has to have a licence to play music from a body called PPL (Phonographic Performance Ltd – www.ppluk.com) which acts on behalf of the record companies to collect royalties.In recent years as internet streaming has become more widespread, the PPL have decided to clarify that the royalty payments that we make only cover our use of music as simulcasts of our radio stations and within the UK.To comply with the new licence terms we have to demonstrate that our listening is only being heard in the UK.As a result we have had to make a slight modification to our player.# For the majority of listeners, the change will be invisible, as we will able to automatically verify that the network you're connected to is in the UK, and show you the player as normal.# Some people are in the UK but their internet connection appears to be connected to networks outside the UK. If you appears to be outside the UK, we will ask you to provide a valid UK postcode. We won't be storing any personal information, but a cookie will allow you to be connected to the player automatically for the next 90 days. You will need to re-validate every 90 days to carry on listening to Capital Radio online.# If you don't live in the UK, and are unable to provide a valid postcode (eg WC2H 7LA) you will be unable to connect to the player.
×
×
  • Create New...