Splak.net
http://splak.net/forum/

Feedback form for website (php+html)
http://splak.net/forum/viewtopic.php?f=3&t=3309
Page 1 of 1

Author:  $torm [ Mon Feb 16, 2009 3:26 pm ]
Post subject:  Feedback form for website (php+html)

Hey guys.

So, i've been making a feedback form for my website (using tutorials and stuff of course) but i've came across a problem.

I added a new field which would be "Request reply from owner", with this coding.

Code:
Request reply from owner<span class="style5">**</span>:<br /> [<input checked="checked" name="request" type="radio" value"Yes" /> Yes] [<input name="request" type="radio" value="No" /> No]


So, they values are Yes and No. I've tested the feedback form and I checked my gmail acc, I received the email. At first it wasnt showing up. So I had to check the Thanks.php (which is when you submit the feedback, a thanks page comes up)

I hadn't put in the input in.

So, I added this
Code:
$request = $_POST['request'];


to this:

Code:
$ip = $_POST['ip'];
$httpagent = $_POST['httpagent'];
$httpref = $_POST['$httpref'];
$nameis = $_POST['nameis'];
$visitormail = $_POST['visitormail'];
$feedback = $_POST['feedback'];
$rating = $_POST['rating'];
$request = $_POST['request'];
$emailvalidation = $_POST['emailvalidation'];
$fieldvalidation = $_POST['fieldvalidation'];
$htmlcontrol= $_POST['htmlcontrol'];
$phpform = $_POST['phpform'];
$htmlform = $_POST['htmlform'];
$attn = $_POST['attn'];


I then had to add the coding to the email body. Which is this coding -
Code:
Request: $request (Request reply: $request) \n


So it looked like this:

Code:
$message = " $todayis [EST] \n
Attention: $attn (Rating: $rating) \n
Request: $request (Request reply: $request) \n
From: $nameis ($visitormail)\n
Requested:
$req \n
Feedback: $feedback \n
Additional Info : IP = $ip \n
Browser = $httpagent \n
Referral = $httpref
";


Wasn't too sure what \n was, so I tried it with and without.

I then submitted another feedback form, but it came back with "Yes" being "on"

As you can see below:



Quote:
Monday, February 16, 2009, 12:14 pm [EST]

Attention: General Feedback (Rating: good)

Request: on (Request reply: on)

From: ()

Requested:


Feedback: Comments and feedback goes here.

Additional Info : IP = 82.18.147.186

Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5)

Referral =




I've looked everywhere for a fix, but I couldn't find one at all.

Anyone have any ideas? :(

Author:  bob [ Mon Feb 16, 2009 3:42 pm ]
Post subject: 

I'm confused,


are you just trying to add a banana to your front page?

Author:  VMAN [ Mon Feb 16, 2009 3:49 pm ]
Post subject: 

BTW \n in PHP is what you use to declare a line break.

Author:  $torm [ Mon Feb 16, 2009 4:04 pm ]
Post subject: 

Ohh right, but yeah. Any ideas? D:

Author:  $torm [ Mon Feb 16, 2009 7:10 pm ]
Post subject: 

Nvm, VMAN found teh error.

Missed the = in value"Yes" :wink:

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/