• Page 1 of 1
  • 1
Archive - read only
uCause Community » Trash & Archives » Trash » PHP Tell A Friend Feature
PHP Tell A Friend Feature
SirDarknight(Tonmoy)Date: Saturday, 2011-07-02, 7:50 PM | Message # 1
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
Code
<?php
if ($d==1){

// Your site url
$site_name=”http://ucause.ucoz.com”;
// Your message for the email
$text=”Hi there, take a look at this great site that I found $site_name”;
// Title of email
$title=”A message from your friend $sendername”;
// Thank you page for users

// START CODE, DO NOT CHANGE ANYTHING BELOW THIS LINE

// check email addresses

$x1 = ereg(“^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$”,$senderemail);
if($x1==0)

{
echo “<div align=center>You <b>must</b> specify a valid email address for yourself.<a href=javascript:history.back(-1)>Return to the form</a>.</div>”;
exit;
}

if ($email<>”") {
$x2 = ereg(“^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$”,$email);
if($x2==0)

{
echo “<div align=center>!!ERROR!!<br>The first email address you entered is invalid. <a href=javascript:history.back(-1)>Return to the form</a>.</div>”;
exit;
}
}

if ($x2!=0)
{
$send = mail(“$email”, “$title”, “$text”, “From: \”$sendername\” $senderemail\n”);

// return thank you page
echo” Thx from your buddy “;
}else{ echo “Sorry Error”;}}
else {
?>

<p><form method=”get” action=”<?php  echo $PHP_SELF; ?>”>
Your name:<br>
<input type=”text” name=”sendername”><br>
Your email address:<br>
<input type=”text” name=”senderemail”><br>
Your friend email address:<br>
<INPUT TYPE=HIDDEN NAME=”d” VALUE=”1″>
<input type=”text” name=”email”><br>
<input type=”submit” value=”Send”>
<input type=”reset” value=”Reset”>
</form></p><? } ?>


Paste This Code Any Where


Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
Maczo12310Date: Saturday, 2011-07-02, 8:40 PM | Message # 2
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
SirDarknight(Tonmoy), Please always provide the screenshots of feature working with uCoz and how it looks like. Otherwise threads like this will be trashed. And I know we dont want this to happen. Please always follow these rule :

1. PrintScreen
2. Code
3. Instalation
4. Additional Information (If Needed)

And it will help us alot.

Best Regards, Donught.



Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
CheburatorDate: Saturday, 2011-07-02, 8:42 PM | Message # 3
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(
Quote (SirDarknight(Tonmoy))
Paste This Code Any Where

Are you sure?! Me not ;P
 
0 Thanked you For This Useful Post:
HermesDate: Sunday, 2011-07-03, 0:06 AM | Message # 4
Member
Group: Senior Members
Messages: 455
Awards: 7
Reputation: 8
Status: :-(
Quote (Cheburator)
Quote (SirDarknight(Tonmoy))
Paste This Code Any Where

Are you sure?! Me not ;P


Cheburator, agree!
 
0 Thanked you For This Useful Post:
Maczo12310Date: Sunday, 2011-07-03, 1:47 AM | Message # 5
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
Same here.. You cant just paste it anywhere.. Please follow the rule i gave you or this post will be trashed.


Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
SirDarknight(Tonmoy)Date: Sunday, 2011-07-03, 7:14 AM | Message # 6
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
Donught, You Can Trash It, I'll get another. The real php is not same as ucoz php. That's why I have some problems on creating these scripts

Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
AnimorphDate: Sunday, 2011-07-03, 3:36 PM | Message # 7
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Trashed
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Trash » PHP Tell A Friend Feature
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers