Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1088 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Quick PHP Help

Thread title: Quick PHP Help
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
02-05-2005, 01:20 AM
#1
CEStudios is offline CEStudios
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 78
iTrader: 0 / 0%
 

CEStudios is on a distinguished road

  Old  Quick PHP Help

Ok, im used to using php for flash. I need to know how to code my php file if i have an input text field in and html script, the init val is email address , what i need to do is have the button the click open the php file and take the e-mail they put in the input text and send it to the bands e-mail. I know how to make the stuff in html with the form, but im not shure how to make my php file.

02-05-2005, 01:40 AM
#2
bluecow is offline bluecow
Status: I'm new around here
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 2
iTrader: 0 / 0%
 

bluecow is on a distinguished road

  Old

Hello,

I didn't know which of these two things you were talking about so I added them both.

To send the information to a database or the like it would be best to go with the loadVariables function in flash and for the url put in something like http://example.com/phppage.php?email=email@email.com
then set the php script to something like:
PHP Code:
<?
if(!$email){
echo 
"No email was entered";
}else{
//You would put all the database information here and add the email to it.
// optionally echo information back to flash
echo "EMAIL=$email";
echo 
"&STATUS=$status";
}
?>
To send them from a flash video to a form on a page with the information it would be best to use the getURL() function in flash.

Hope this helps.

02-05-2005, 01:44 AM
#3
CEStudios is offline CEStudios
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 78
iTrader: 0 / 0%
 

CEStudios is on a distinguished road

  Old

lol, i know how to do it in flash, i need to know how to do it from an html site, in html script, i need to know what to set my php script to to grab the input text outta the html script and send to e-mail

02-05-2005, 01:47 AM
#4
bluecow is offline bluecow
Status: I'm new around here
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 2
iTrader: 0 / 0%
 

bluecow is on a distinguished road

  Old

oh well thats actually quite easier on html forums just set the action to the php script and the name of the textbox etc on the form is the same except with a "$" added to it.

and for the email part you should use php's mail function which is mail($to, $subject, $message, $from) I believe...

02-05-2005, 02:19 AM
#5
CEStudios is offline CEStudios
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 78
iTrader: 0 / 0%
 

CEStudios is on a distinguished road

  Old

OK this is my Html script for the button form and stuff, now i need to know how to load this into php so i can get what they put in the input text to go to e-mail.
HTML Code:
 <FORM action=http://www.cuttingedgestudios.com/mail.php 
            method=post>
	  <p>
	      <INPUT type=hidden value=add name=action> 
	      <INPUT 
            type=hidden value=1 name=list>
	      <span class="pagedef">Sign up here for the Bound To Change Newsletter. Stay informed on their constant whereabouts and activity with the newsletter!
	    </span><BR>
	    <BR>
	    <INPUT size=15 value="address" 
                  name=address> 
                 <INPUT type=submit value=Join> 
      </p>
	  </FORM>

02-05-2005, 02:29 AM
#6
derek lapp is offline derek lapp
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
 
Posts: 2,246
iTrader: 0 / 0%
 

derek lapp is on a distinguished road

  Old

is this for a mailing list or a contact form? dpeending on which, it'll detemrine what you do witht he variable, but regardless, you get the information the same way

Code:
<form action="yourfile.php" method="post">
	<span class="pagedef">Sign up here . . .</span>
	<input size="15" value="Enter your e-mail addresshere" name="address" />
	<input type="submit" value="Join" />
</form>
php
Code:
<?php

	$address = $_POST["address"];

	// whatever you're doing with this info goes here

?>

02-05-2005, 02:41 AM
#7
CEStudios is offline CEStudios
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 78
iTrader: 0 / 0%
 

CEStudios is on a distinguished road

  Old

ok i get that, where u have whatever youre doing wiht this goes here, what do i put there to send the address post to an e-mail, like i want to send that to for say, cnkrsdyj@cuttingedgestudios.com with the subject of NewsLetterEmails its for a signup on a newsletter, the band just needs a input text area for people to sign up for a newsletter, he said all he needs is a spot for their e-mail to go in then have it e-mailed to them.

02-05-2005, 03:42 AM
#8
Michael is offline Michael
Michael's Avatar
Status: Senior Member
Join date: Dec 2004
Location:
Expertise:
Software:
 
Posts: 845
iTrader: 0 / 0%
 

Michael is on a distinguished road

  Old

invano.com then look at the php sniplets in the php tutorial. It'll help a lot.

PHP Code:
<?
echo("Thank you message goes here");
mail("you@yourdomain.com""Subject goes here, " ,
$message,
"From: $email\r\nReply-To: $email\r\n");
?>
wanted something like that right?

02-05-2005, 04:05 AM
#9
derek lapp is offline derek lapp
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
 
Posts: 2,246
iTrader: 0 / 0%
 

derek lapp is on a distinguished road

  Old

Code:
$address = $_POST["address"];

if(isset($_POST['submit'])) {
	mail(cnkrsdyj@cuttingedgestudios.com, $address);
}
put that where i have // stuff goes here. i cut a lot of corners, but it should work.

02-07-2005, 02:12 AM
#10
CEStudios is offline CEStudios
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 78
iTrader: 0 / 0%
 

CEStudios is on a distinguished road

  Old

Ok having problems, my code on the html part is
<html><form action="http://www.cuttingedgestudios.com/newsletter.php" method="post">
<span class="pagedef">Sign up here for the Bound To Change newsletter. This will let you stay up to
date on the current happenings in the Bound To Change World! So stay connected, sign up.</span>
<input size="15" value="E-mail Address" name="address" />
<input type="submit" value="Join" />
</form></html>
and my code in the php file is
<php><?php

$address = $_POST["address"];

if(isset($_POST['submit'])) {
mail(cnkrsdyj@cuttingedgestudios.com, $address);
}

?></php>
ANd when i tested it out, it says Parse error: parse error in /var/www/html/newsletter.php on line 6 ? Please help.

Closed Thread  
Page 1 of 2 1 2 >


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

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed