Jump to content

Recommended Posts

Hi, I am fairly new to PHP and know minor details in it. I am trying to do a few things that I am having a terrible time with, hopefully someone here can help:

 

1. I have a page that is a User Agreement page. So before they can go on to the next page, I need them to agree to this agreement. How would I go about doing that?

 

2. I have been having troubles with formmail. I get the e-mails to the e-mail I have set up, but I always get an error. Also, I tried setting up the re-direct but something went wrong.

 

3. This questions kind of stems off of the first one, but once the user accepts the agreement page, they will be brought to a form to fill out  and then a payment option. I was wondering, would there be any way I could count how many people have signed up and then turn off the  sign up after a certain number?

 

Anyway, I am not certain if I have asked too much or what because I am completely lost right now. These are the things that I am having the most trouble with and not been able to find out solutions. Thanks in advance for any help!

 

If you need more info please let me know what you need.

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/
Share on other sites

1. Use session to check if "agree" button was hit

 

2. What errors are you getting?

 

3. Use database, like MySQL database

 

Feel free to ask if you have other questions:)

 

Ya, I have no idea what session is.

The errors I'm getting have to do w/ recipients. Is what it says.

Thanks on the database, ill do that.

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/#findComment-287147
Share on other sites

This forum is more for help wioth specific problems (code). If you have no idea what your doing, you need to read some tutorials. There is no point in us writtting tutorials especially for your needs, there are many tutorials allready on the web.

 

Question 1 and 3 can easily be answered by reading this tutorial on how to deal with forms, and this tutorial on working with files.

 

As for question 2, we need to see some code and the error your getting.

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/#findComment-287148
Share on other sites

<form method="POST" action="?order">
      <div align="center">
        <p>If you agree please type YES into the box, and if you do not please type NO into the box:</p>
        <p><input type"text" name"order"/>
        <p>            
        <input type="submit" value="submit" />
        </p>
        </div>
</form>

 

<?
if($_POST[’order’] == "YES")
{
echo "yay13";
}
if($_POST[’order’] == "NO")
{
echo "Thank you for your patience";
}
else
{
echo "I am sorry but at this time we will not be able to process your request.";
}
?>

 

Thats the code for my User Agreement. It doesn't work

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/#findComment-287159
Share on other sites

<form method="post" action="http://www.sconnietours.com/Custom Order Request.php" name="cusorder">
    <input type="hidden" name="recipients" value="webmaster@sconnietours.com" />
    <input type="hidden" name="required" value="email:Your email address,realname:Your name" />
    <input type="hidden" name="subject" value="Custom Order Request" />
<input type="hidden" name="good_url"    value="?request" />
<input type="hidden" name="bad_url"    value="?error" />

 

And that's the intro form code for my page w/ that error that i posted earlier

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/#findComment-287160
Share on other sites

I'll do that in a second. I have the option select on, but when I try and read it from $_POST it doesn't acknowledge. Am I reading the param in right? with this code?

 

<?

if($_POST[’order’] == "YES")

{

echo "yay13";

}

if($_POST[’order’] == "NO")

{

echo "Thank you for your patience";

}

else

{

echo "I am sorry but at this time we will not be able to process your request.";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/#findComment-287168
Share on other sites

<form method="POST" action="?order">
      <div align="center">
        <p><select name="order">
	<option value="YES">Yes</option>
	<option value="NO">No</option>
	</select>
        </p>
        <p>            
        <input type="submit" value="Continue" />
        </p>
        </div>
</form>

 

<?
if($_POST[`order`] == 'YES')
{
echo "yay13";
}
else
{
echo "I am sorry but at this time we will not be able to process your request.";
}
?>

 

 

Thats what I have now

Link to comment
https://forums.phpfreaks.com/topic/57945-lots-of-issues/#findComment-287176
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.