Front Office Football Central  

Go Back   Front Office Football Central > Archives > FOFC Archive
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 12-08-2005, 04:37 PM   #1
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
PING: HTML/XML Experts

I have a question about adding an anonymous tip box. How would I do that.
__________________



vtbub is offline   Reply With Quote
Old 12-08-2005, 04:39 PM   #2
Draft Dodger
Coordinator
 
Join Date: Jan 2001
Location: Keene, NH
you mean like a paypal donation thingy?
__________________
Mile High Hockey
Draft Dodger is offline   Reply With Quote
Old 12-08-2005, 04:40 PM   #3
Draft Dodger
Coordinator
 
Join Date: Jan 2001
Location: Keene, NH
or a don't bet on horses thingy?
__________________
Mile High Hockey
Draft Dodger is offline   Reply With Quote
Old 12-08-2005, 04:42 PM   #4
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
A box that people can leave rumour type tips and they get emailed to me for a second look.

News tips.
__________________


vtbub is offline   Reply With Quote
Old 12-08-2005, 04:43 PM   #5
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
dola,

like this: hxxp://mediabistro.com/tvnewser/
__________________


vtbub is offline   Reply With Quote
Old 12-08-2005, 05:46 PM   #6
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
Here's a link to an input form and you can modify it for your needs.
http://www.w3schools.com/html/tryit....html_form_mail

Maybe something like this:

Anonymous Tips










And here is the code for it:
Just replace your email address and the text for the submit button to your liking. Also get rid of the spaces.

< form action="MAILTO:[email protected]" method="post" enctype="text/plain" >
< h4 >Anonymous Tips< /h4 >
< textarea name="tip" rows="10" class="xsmalltext" style="width:135px;" >< /textarea >
< br >
< input type="submit" title="While vtbub respects the confidentially of all email tips, you can use this form to send entirely anonymous information." value="SEND TIP" alt="While vtbub respects the confidentially of all email tips, you can use this form to send entirely anonymous information." style="font-size:9px;background-color:#fff;" >
< /form >
Antmeister is offline   Reply With Quote
Old 12-08-2005, 05:59 PM   #7
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
thx guy, that be it.
__________________


vtbub is offline   Reply With Quote
Old 12-08-2005, 06:14 PM   #8
Draft Dodger
Coordinator
 
Join Date: Jan 2001
Location: Keene, NH
can't WAIT to start using that...

*whistles innocently*
__________________
Mile High Hockey
Draft Dodger is offline   Reply With Quote
Old 12-08-2005, 06:17 PM   #9
sterlingice
Hall Of Famer
 
Join Date: Apr 2002
Location: Back in Houston!
Hehe

SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out!

Janos: "Only America could produce an imbecile of your caliber!"
Freakazoid: "That's because we make lots of things better than other people!"


sterlingice is offline   Reply With Quote
Old 12-08-2005, 06:24 PM   #10
Easy Mac
Registered User
 
Join Date: Nov 2001
Location: Here
tip: foz is gay.......
Easy Mac is offline   Reply With Quote
Old 12-08-2005, 07:04 PM   #11
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
By the way, that is not the most efficient way to do it. I just realized that this will open up the email program on the tipster's computer before they send it. Here is one that makes it a lot easier for them, but it will require more steps.

First enter this code into your html page where you want it to appear:
< form method="POST" action="atip.php" >
< h4 >Anonymous Tip< /h4 >
< textarea name="Tips" rows="10" style="width:135px;" >< /textarea >
< /br >
< input type="submit" name="submit" value="Submit" style="font-size:9px;background-color:#fff;" >
< /form >

Now create a php page and call it atip.php. Enter the code below into the page:
< ?php

$EmailFrom = "[email protected]"; <------You could change this to something more to your liking but you don't have to.
$EmailTo = "[email protected]"; <-----Replace with your email address.
$Subject = "Someone has an anonymous tip";
$Tip = Trim(stripslashes($_POST['Tips']));

// validation
$validationOK=true;
if (!$validationOK) {
print "";
exit;
}

// prepare email body text
$Body = "";
$Body .= "Tip: ";
$Body .= $Tip;
$Body .= "\n";

// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page
if ($success){
print "";
}
else{
print "";
}

? >

Now you have one last step:
All you have to do is create an ok.html page and an error.html page.
This just alerts the tipster that is went through or it didn't.
Antmeister is offline   Reply With Quote
Old 12-09-2005, 12:52 AM   #12
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
self bump
__________________


vtbub is offline   Reply With Quote
Old 12-09-2005, 04:51 PM   #13
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
ok, cut and pasted, but it is telling me when I test that an input file has not been selected.
__________________


vtbub is offline   Reply With Quote
Old 12-09-2005, 05:07 PM   #14
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
I hope you deleted the spaces in the tags. I only put them there so that you can view the code. On the php section, I only put spaces at the beginning and ending lines of code.

It should work fine. I have tested it out on my site.
http://www.almarks.com/atip.html
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:09 PM   #15
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
Ugh...oh and on that last step, you should create an ok.htm and error.htm page, not html.
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:15 PM   #16
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
OK, the box shows up. I deleted the spaces in the .php file, but it still says no input file selected.

Where do the ok and error pages go? I put them in the same folder as the template.
__________________


vtbub is offline   Reply With Quote
Old 12-09-2005, 05:18 PM   #17
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
ok, ty.

seamonkey, lol
__________________


vtbub is offline   Reply With Quote
Old 12-09-2005, 05:18 PM   #18
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
Son of a seamonkey.....hold on....I just realized some code doesn't show in the php section. I will probably have to add spaces in certain parts.
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:22 PM   #19
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
< ?php

$EmailFrom = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Someone has an anonymous tip";
$Tip = Trim(stripslashes($_POST['Tips']));

// validation
$validationOK=true;
if (!$validationOK) {
print "< meta http-equiv=\"refresh\" content=\"0;URL=error.htm\" >";
exit;
}

// prepare email body text
$Body = "";
$Body .= "Tip: ";
$Body .= $Tip;
$Body .= "\n";

// send email
$success = mail($EmailTo, $Subject, $Body, "From: < $EmailFrom >");

// redirect to success page
if ($success){
print "< meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\" >";
}
else{
print "< meta http-equiv=\"refresh\" content=\"0;URL=error.htm\" >";
}
? >



Wherever you see these symbols < >, delete the spaces. Sorry about that. I forget that it still treats those as tags and it won't show up in a post.

Last edited by Antmeister : 12-09-2005 at 05:23 PM.
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:26 PM   #20
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
Also remember that whatever you named your .php file should be the same name referenced in your html file.
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:28 PM   #21
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
In other words, this section of the .html file:
< form method="POST" action="atip.php" >
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:37 PM   #22
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
Quote:
Originally Posted by Antmeister71
In other words, this section of the .html file:
< form method="POST" action="atip.php" >
OK, made sure of that part. Since it is a "php" file on a template that this is on, does that make any difference as supposed to html?

Also, is there some basic syntax I'm missing that may be partof the problem? I deleted the extra spaces
__________________


vtbub is offline   Reply With Quote
Old 12-09-2005, 05:42 PM   #23
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
Quote:
Originally Posted by vtbub
OK, made sure of that part. Since it is a "php" file on a template that this is on, does that make any difference as supposed to html?

Also, is there some basic syntax I'm missing that may be partof the problem? I deleted the extra spaces

Awwww.....yes it makes a difference. I thought you were putting this on an html page.
Antmeister is offline   Reply With Quote
Old 12-09-2005, 05:45 PM   #24
vtbub
College Starter
 
Join Date: Jan 2001
Location: Burlington, VT USA
Ant, u have been PMs'ed
__________________


vtbub is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 04:23 AM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Front Office Football Central Database Error
Database Error Database error
The Front Office Football Central database has encountered a problem.

Please try the following:
The forumsold.operationsports.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.