hi,
would anyone know if there is a php script to Accept the Terms & Conditions. The customer must check the Terms & Conditions box before he/she is able to go to the next page.
Not really sure what this script would come under
thanks
13 21208
hi,
would anyone know if there is a php script to Accept the Terms & Conditions. The customer must check the Terms & Conditions box before he/she is able to go to the next page.
Not really sure what this script would come under
thanks
If your looking just to download the script from someone else than I would type "php script to Accept the Terms & Conditions" into Google and go from there. Plenty of sites like hotscripts.com come up and you can search through what they have and go from there.
Heya, Camphor.
On the page with the terms and conditions, add a checkbox: -
<form method="post" action="..." >
-
.
-
.
-
.
-
<input type="checkbox" name="accept" /> Accept
-
On the page that processes the form: -
if( isset($_POST['accept']) )
-
{
-
// User accepted terms & conditions. Go to next page.
-
}
-
else
-
{
-
// User did not accept. Go back.
-
}
-
Try this
mixing with javascripting under 'echo' helping... -
<? php code here...
-
echo "head<script>
-
-
-
var checkobj
-
-
function agreesubmit(el){
-
checkobj=el
-
if (document.all||document.getElementById){
-
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
-
var tempobj=checkobj.form.elements[i]
-
if(tempobj.type.toLowerCase()=="submit")
-
tempobj.disabled=!checkobj.checked
-
}
-
}
-
}
-
-
function defaultagree(el){
-
if (!document.all&&!document.getElementById){
-
if (window.checkobj&&checkobj.checked)
-
return true
-
else{
-
alert("Please read/accept terms to submit form")
-
return false
-
}
-
}
-
}
-
-
</script>head
-
body<form name="agreeform" onSubmit="return defaultagree(this)">
-
Rest of your form here<br>
-
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"><b>I agree to the above terms</b><br>
-
<input type="Submit" value="Submit!" disabled>
-
</form>
-
-
<script>
-
//change two names below to your form's names
-
document.forms.agreeform.agreecheck.checked=false
-
</script>
-
-
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
-
<a href="http://www.thescripts.com">You sign!</a></font></p>body";
-
?>
before any["] put this [\] will be look-> echo "<head> \"text\" and etc. but not first and last - did you know...!!!
thanks
you is now free...
thank you all for your reply, will try the scripts out
Heya, Camphor.
On the page with the terms and conditions, add a checkbox: -
<form method="post" action="..." >
-
.
-
.
-
.
-
<input type="checkbox" name="accept" /> Accept
-
On the page that processes the form: -
if( isset($_POST['accept']) )
-
{
-
// User accepted terms & conditions. Go to next page.
-
}
-
else
-
{
-
// User did not accept. Go back.
-
}
-
Hi pbmods,
I tried the code out but it doesn't seem to work and I don't know why, I am a newbie in php, this is what I did -
<?php
-
-
if( isset($_POST['accept']) )
-
-
{
-
-
// User accepted terms & conditions. Go to next page.
-
-
}
-
-
else
-
-
{
-
-
// User did not accept. Go back.
-
-
}
-
?>
-
<form method="post" action="">
-
-
<p class="booking"><input type="checkbox" id="cust_agree" name="accept" /> I accept the <a href="terms.php">Terms and Conditions</a></p>
-
-
<p>If you wish to place an order, please accept the <a href="terms.php">Terms and Conditions </a>by checking<br />
-
the box. We reserve the right to refuse any order at our sole discretion and will refund<br /> the fee</p>
-
This is what I want to happen, the customer clicks on a' Package' and before the customer can go to the cart page they must accept the terms and conditions.
This is the link to the page http://www.photorestorationexpert.co.uk/order/index.php
thanks
Heya, camphor.
In your case, you'll probably want to do something like this: -
if( isset($_POST['accept']) )
-
{
-
-
// User accepted terms & conditions. Go to next page.
-
header('Location: cart.php'); // (or whatever the cart page is called)
-
}
-
else
-
{
-
-
// User did not accept. Go back.
-
echo '<div>You must agree to the terms and conditions to continue.'</div>
-
}
-
Heya, camphor.
In your case, you'll probably want to do something like this: -
if( isset($_POST['accept']) )
-
{
-
-
// User accepted terms & conditions. Go to next page.
-
header('Location: cart.php'); // (or whatever the cart page is called)
-
}
-
else
-
{
-
-
// User did not accept. Go back.
-
echo '<div>You must agree to the terms and conditions to continue.'</div>
-
}
-
pbmods,
I used the code and got this error message instead:
Parse error: syntax error, unexpected '<' in /home/photores/public_html/order/index.php on line 124
this is line 124 -
<?php
-
if( isset($_POST['accept']) )
-
{
-
// User accepted terms & conditions. Go to next page.
-
header('Location: cart.php'); // (or whatever the cart page is called)
-
}
-
else
-
{
-
// User did not accept. Go back.
-
(line 124) echo <div>'You must agree to the terms and conditions to continue.'</div>
-
}
-
?>
-
<form method="post" action="">
-
-
<p class="booking"><input type="checkbox" id="cust_agree" name="accept" /> I accept the <a href="terms.php">Terms and Conditions</a></p>
-
I tried fixing it but wasn't really sure what I was doing
thanks
The single qoutes - line 124 - need to be before the first <DIV> and after the last <DIV>.
Good day.
:)
The single qoutes - line 124 - need to be before the first <DIV> and after the last <DIV>.
Good day.
:)
markusn00b,
thanks for that.
This is what I want to happen, the customer clicks on a' Package' and before the customer can go to the cart page they must first accept the terms and conditions.
This is the link to the page http://www.photorestorationexpert.co.uk/order/index.php
I tried the code that pbmods gave me but it still goes to the cart page without the customer accepting the terms and conditions first, which I want to happen
thanks
http://www.photorestorationexpert.co.uk/order/index.php
Is that ^^^^ the page in question?
And also, do you want to check that the box has been checked when the 'click to order' button has been pressed?
merry christmas
:)
http://www.photorestorationexpert.co.uk/order/index.php
Is that ^^^^ the page in question?
And also, do you want to check that the box has been checked when the 'click to order' button has been pressed?
merry christmas
:)
That is the page in question and I also want to check that the box (terms & conditions) has been checked when the 'click to order' button has been pressed?
In other words, yes to the above 2 questions
happy new year :-)
-
<script type="text/javascript">
-
function checkTerms(){
-
var checkBox = document.termsAndConditions.accept;
-
if(!checkBox.checked){
-
alert("You must accept our terms and conditions");
-
window.location = "http://www.photorestorationexpert.co.uk/order/index.php#termsAndConditions";
-
return false;
-
} else {
-
return true;
-
}
-
}
-
</script>
-
First we assign the checkBox variable to the checkbox in the form.
Then we check (through onclick - coming later) whether the if statement returns true or false; if it returns false, we alert them and scroll the page down to the terms and conditions*, then we return false - so the href="" doesnt execute.
If the if statamen returns true; the checkbox was checked so carry on.
[code=html]
<form id="termsAndConditions" name="termsAndConditions">
<input type="checkbox" name="accept" />
</form>
<a href="order.html..." onclick="checkTerms()">Click here to order</a>
[/html]
The html.. you'll have to adapt this to your code.
*To have the page scroll down to the terms and conditions you'll have to assign an ID to it. Then you can pass that id into the url and it will automatically scroll down to that section.
Hope this helps :)
hi markusn00b,
I am finding this very frustrating as the php/html bit is not working when I try to test the order page, I have very little knowledge of javascript but I understand your explanation, for the php/html code, would this be correct -
-
Package 4 £30
-
<div id="service1">
-
<ul>
-
<li>Removal of scratches from face, hand or other complex areas</li>
-
<li>Teeth whitening</li>
-
<li>Merging two or more photos together</li>
-
<li>Color correction of large faded areas</li>
-
<li>Repair of tears</li>
-
<li>Repair of creases</li>
-
</ul></div>
-
<a href='<?php ProductBuyLink(11); ?>' onclick="checkTerms()"><img src="../images/click-toorder.png" class="clickToOrderBtn" width="80" height="15" border="0" alt="order button" /></a></div>
-
CSS
.clickToOrderBtn {
margin-left:85%;
}
#service1 {
margin:0;
font-size:1.1em;
}
#service1 ul {
font-size:1.0em;
font-family:"Century Gothic";
}
#service1 li {
list-style-type:disc;
margin-left:5%;
font-size:1.0em;
}
I am using php as the shopping cart I am using uses php. I am using an image for the click here to order, so would the bold bit be correct
thanks once again and your help is much appreciated
Sign in to post your reply or Sign up for a free account.
Similar topics
by: orekinbck |
last post by:
Hi There
Say I want to check if object1.Property1 is equal to a value, but
object1 could be null.
At the moment I have code like this:
if (object1 != null)
{
if (object1.Property ==...
|
by: Immortalist |
last post by:
Various aquisition devices that guide learning along particular
pathways towards human biases. And as E.O. Wilson might say mental
development appears to be genetically constrained.
(1) Language...
|
by: Rob |
last post by:
Hi all,
I would like to have a textarea control on my web page that is complete
with terms and conditions, in addition, I would like a radio button
beneath this to indicate the acceptance of...
|
by: arnuld |
last post by:
on page 29, section 1.9 Character Arrays, i see an example:
/* getline: read a line into s, return length */
int getline(char s,int lim)
{
int c, i;
for (i=0; i < lim-1 &&...
|
by: whitey |
last post by:
Can anybody supply me with a script the does what is in the title above please?
I have tried so many different methods!
here is what im currently trying to get to work
SIGN IN
<!doctype...
|
by: camphor |
last post by:
hi,
I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
|
by: aRTx |
last post by:
I have try a couple of time but does not work for me
My files everytime are sortet by NAME.
I want to Sort my files by Date-desc.
Can anyone help me to do it?
The Script
<?
/*
ORIGJINALI
|
by: happyse27 |
last post by:
Hi All,
I modified the user registration script, but not sure how to make it check for each variable in terms of preventing junk registration and invalid characters?
Two codes below :
a)...
|
by: jeddiki |
last post by:
Hi,
As I am in Turkey at present, I can not see vidoes on
youtube. So I have tried a few proxies but keep finding them slow or
not working.
So I have installed myphpProxy on my server under...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |