Adobe Dreamweaver Forums



Last 10 THreads :         Flex and ColdFusion web services (Last Post : jfb00 - Replies : 1 - Views : 2 )           »          Advanced datagrid using Remote Objects (Last Post : rkcy - Replies : 5 - Views : 6 )           »          Flickering tooltip in bottom right corner (Last Post : aperitech - Replies : 4 - Views : 5 )           »          Change Font on Buttons (Last Post : CJ KY - Replies : 0 - Views : 1 )           »          RoboHelp & Knowledge Bases (Last Post : lmarden - Replies : 2 - Views : 3 )           »          catching errors from remotely invoked processes (Last Post : Amy Blankenship - Replies : 3 - Views : 4 )           »          A question for the gurus (Last Post : Amy Blankenship - Replies : 1 - Views : 2 )           »          Naming Layers CS4 Mac (Last Post : Type & Art - Replies : 0 - Views : 1 )           »          Flash CS4 on Windows 2003? (Last Post : Richard Morey - Replies : 0 - Views : 1 )           »          Where are the fonts located? (Last Post : Mike Blaustein - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Application Development
 
Tags: , , ,



Reply
  #1 (permalink)  
Old 07-23-2008, 10:26 PM
Quiet Winter
 
Posts: n/a
Diggs:
Default Simple PHP radio buttons

Hi. I'm trying to program some radio buttons to put in an ASP form, using PHP
coding. I just need something simple for three yes/no questions.

I've looked around online and haven't found anything of much help. Any help is
appreciated.

Thanks.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-25-2008, 02:05 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

> Hi. I'm trying to program some radio buttons to put in an ASP form, using
> PHP
> coding. I just need something simple for three yes/no questions.


Now I'm confused. You cannot use PHP on an ASP page. Can you clarify what
it is you are doing?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Quiet Winter" <webforumsuser@macromedia.com> wrote in message
news:g6870l$a8m$1@forums.macromedia.com...
> Hi. I'm trying to program some radio buttons to put in an ASP form, using
> PHP
> coding. I just need something simple for three yes/no questions.
>
> I've looked around online and haven't found anything of much help. Any
> help is
> appreciated.
>
> Thanks.
>


Reply With Quote
  #3 (permalink)  
Old 07-25-2008, 10:33 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

So, you mean you are using a PHP scripted page to process the data from an
ASP form?

> I tried an HTML form, but it
> kept failing, whereas the ASP worked immediately, so I have to stick to an
> ASP
> form.


This REALLY makes no sense. What was failing?

So, what do you want to do with the radio buttons?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Quiet Winter" <webforumsuser@macromedia.com> wrote in message
news:g6ddna$6v1$1@forums.macromedia.com...
> I'm using an external PHP page to program my ASP form. Everything so far
> works,
> except that I'm unsure how to put the radio buttons in it.
>
> What it is is I used a form, and for the info I have this: <form
> method="post"
> action="phpform.php">.
>
> For my PHP coding, I want to how to add the radio info. So, to clarify,
> it's
> going into PHP, but it's linked to an ASP form. I tried an HTML form, but
> it
> kept failing, whereas the ASP worked immediately, so I have to stick to an
> ASP
> form.
>


Reply With Quote


  #4 (permalink)  
Old 07-25-2008, 10:33 PM
Quiet Winter
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

I'm using an external PHP page to program my ASP form. Everything so far works,
except that I'm unsure how to put the radio buttons in it.

What it is is I used a form, and for the info I have this: <form method="post"
action="phpform.php">.

For my PHP coding, I want to how to add the radio info. So, to clarify, it's
going into PHP, but it's linked to an ASP form. I tried an HTML form, but it
kept failing, whereas the ASP worked immediately, so I have to stick to an ASP
form.

Reply With Quote
  #5 (permalink)  
Old 07-25-2008, 10:54 PM
5th Star from Venus
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

Yes, correct.

Incase I'm making it confusing...I have an ASP form that's information is collected by a PHP scripted page.
Reply With Quote
  #6 (permalink)  
Old 07-25-2008, 10:54 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

What do you want to do with the radio buttons?

Can we see the scripting on the PHP page?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"5th Star from Venus" <webforumsuser@macromedia.com> wrote in message
news:g6dfia$8qu$1@forums.macromedia.com...
> Yes, correct.
>
> Incase I'm making it confusing...I have an ASP form that's information is
> collected by a PHP scripted page.


Reply With Quote


  #7 (permalink)  
Old 07-25-2008, 10:54 PM
Quiet Winter
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

So, you mean you are using a PHP scripted page to process the data from an ASP
form? - Yes

I want to know a working code for radio buttons to use in a PHP scripted page.
I've tried some before but they wouldn't work, and I'm hoping that a form built
in html and an asp form generally work the same. If you need to see the PHP
script, I can post it for you.

Reply With Quote
  #8 (permalink)  
Old 07-25-2008, 10:54 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

> I want to know a working code for radio buttons to use in a PHP scripted
> page.


I'm very sorry, but I have no idea what you are asking for. Can you please
try to give more information?

A form is an HTML construction. It will work on an HTML page, and ASP page,
a ColdFusion page, a PHP page, a JSP page, or any other kind of server model
page. The type of page will have no effect on whether or not the form
"works", depending of course on what you mean by "works".


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Quiet Winter" <webforumsuser@macromedia.com> wrote in message
news:g6dg0d$9d9$1@forums.macromedia.com...
> So, you mean you are using a PHP scripted page to process the data from an
> ASP
> form? - Yes
>
> I want to know a working code for radio buttons to use in a PHP scripted
> page.
> I've tried some before but they wouldn't work, and I'm hoping that a form
> built
> in html and an asp form generally work the same. If you need to see the
> PHP
> script, I can post it for you.
>


Reply With Quote
  #9 (permalink)  
Old 07-25-2008, 11:59 PM
Quiet Winter
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

Yes, it seems I'm confusing you, so I'll post it. The HTML not working thing
was actually something to do with my FTP provider, so I won't even go into that
anymore, since it's off-subject for what you can help me with.

Here's my PHP script:

<?php

$EmailFrom = "site@domain.com";
$EmailTo = "webmaster@domain.com";
$Subject = "Referral Information";
$Name = Trim(stripslashes($_POST['Name']));
$Date = Trim(stripslashes($_POST['Date']));
$Address = Trim(stripslashes($_POST['Address']));
$City = Trim(stripslashes($_POST['City']));
$State = Trim(stripslashes($_POST['State']));
$Zip = Trim(stripslashes($_POST['Zip']));
$Email = Trim(stripslashes($_POST['Email']));
$Phone = Trim(stripslashes($_POST['Phone']));


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

$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Date: ";
$Body .= $Date;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "City: ";
$Body .= $City;
$Body .= "\n";
$Body .= "State: ";
$Body .= $State;
$Body .= "\n";
$Body .= "Zip: ";
$Body .= $Zip;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $Phone;


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

if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=sent.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>

The form is mostly fill-ins, as you can see, and I want to add three yes/no
questions.

Reply With Quote


  #10 (permalink)  
Old 07-26-2008, 01:58 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Simple PHP radio buttons

There's still a good deal of information missing here. Perhaps a look at
this code/page will help you figure out what needs to be added to your PHP
script -

<?php

if (isset($_POST['submit']) && $_POST['submit'] == 'SUBMIT') {
foreach($_POST as $key => $value) {
echo $key . " => " . $value . "<br>";
}
exit();
}


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Radiobutton Test</title>
</head>

<body>
<form name="form1" method="post" action="">
<label for="radiobutton">red</label>
<input name="radiobutton" type="radio" value="red" id="redbutton">
<label for="label">green</label>
<input name="radiobutton" type="radio" value="green" id="greenbutton">
<label for="radio">blue</label>
<input name="radiobutton" type="radio" value="blue" id="bluebutton">
<input type="submit" name="submit" id="submit" value="SUBMIT">
</form>
</body>
</html>

Your script will need to pick up the value of the radiobutton group, as I
have done above, and add it to the body of the mail message.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Quiet Winter" <webforumsuser@macromedia.com> wrote in message
news:g6djla$d39$1@forums.macromedia.com...
> Yes, it seems I'm confusing you, so I'll post it. The HTML not working
> thing
> was actually something to do with my FTP provider, so I won't even go into
> that
> anymore, since it's off-subject for what you can help me with.
>
> Here's my PHP script:
>
> <?php
>
> $EmailFrom = "site@domain.com";
> $EmailTo = "webmaster@domain.com";
> $Subject = "Referral Information";
> $Name = Trim(stripslashes($_POST['Name']));
> $Date = Trim(stripslashes($_POST['Date']));
> $Address = Trim(stripslashes($_POST['Address']));
> $City = Trim(stripslashes($_POST['City']));
> $State = Trim(stripslashes($_POST['State']));
> $Zip = Trim(stripslashes($_POST['Zip']));
> $Email = Trim(stripslashes($_POST['Email']));
> $Phone = Trim(stripslashes($_POST['Phone']));
>
>
> $validationOK=true;
> if (Trim($Name)=="") $validationOK=false;
> if (!$validationOK) {
> print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
> exit;
> }
>
> $Body = "";
> $Body .= "Name: ";
> $Body .= $Name;
> $Body .= "\n";
> $Body .= "Date: ";
> $Body .= $Date;
> $Body .= "\n";
> $Body .= "Address: ";
> $Body .= $Address;
> $Body .= "\n";
> $Body .= "City: ";
> $Body .= $City;
> $Body .= "\n";
> $Body .= "State: ";
> $Body .= $State;
> $Body .= "\n";
> $Body .= "Zip: ";
> $Body .= $Zip;
> $Body .= "\n";
> $Body .= "Email: ";
> $Body .= $Email;
> $Body .= "\n";
> $Body .= "Phone: ";
> $Body .= $Phone;
>
>
> $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
>
> if ($success){
> print "<meta http-equiv=\"refresh\" content=\"0;URL=sent.html\">";
> }
> else{
> print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
> }
> ?>
>
> The form is mostly fill-ins, as you can see, and I want to add three
> yes/no
> questions.
>


Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 08:05 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk