Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 18-04-2007, 11:45 PM   #1 (permalink)
Alive Again...
 
satyamy's Avatar
 
Join Date: May 2005
Location: Mumbai
Posts: 1,668
Question PHP Feedback form not working........?


I created one feedback form some time before at that time it was working
but now i dont know what happened it is not working
It is attached here
Can someone findout whats wrong in it..........?
Pls help me
satyamy is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 18-04-2007, 11:48 PM   #2 (permalink)
Rebooting
 
Choto Cheeta's Avatar
 
Join Date: Aug 2004
Location: 220.225.82.33
Posts: 6,266
Default Re: PHP Feedback form not working........?

Quote:
It is attached here

Where ??
__________________
rebooting
ChotoCheeta.com
Choto Cheeta is offline  
Old 18-04-2007, 11:51 PM   #3 (permalink)
Alive Again...
 
satyamy's Avatar
 
Join Date: May 2005
Location: Mumbai
Posts: 1,668
Smile Re: PHP Feedback form not working........?

sorri their was some problem
now it is attached
Attached Files
File Type: zip feedback.zip (3.1 KB, 18 views)
satyamy is offline  
Old 19-04-2007, 01:23 AM   #4 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default Re: PHP Feedback form not working........?

I didn't check the working yet.
AFAIK, u have to fill the mail server u will be using too! Did u disable ur mail server?
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 19-04-2007, 06:38 PM   #5 (permalink)
Alive Again...
 
satyamy's Avatar
 
Join Date: May 2005
Location: Mumbai
Posts: 1,668
Default Re: PHP Feedback form not working........?

it still not working........?
satyamy is offline  
Old 19-04-2007, 07:06 PM   #6 (permalink)
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: PHP Feedback form not working........?

Satyam, Can you explain what happens actually?
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline  
Old 19-04-2007, 07:16 PM   #7 (permalink)
Alive Again...
 
satyamy's Avatar
 
Join Date: May 2005
Location: Mumbai
Posts: 1,668
Default Re: PHP Feedback form not working........?

Yes
long long ago
I was searching for Feedback form Code
so i refered this thread
Want to create Feedback form.........?
Need Codes.........

Need a code...

Help with Code

but didnt find any solution
but finally
with the help of my friend Amitava
i got the correct feedback form code
but at that time i didnt have any website
now i created one website but that code is not working i have attached it here
Pls help me...........
satyamy is offline  
Old 20-04-2007, 05:33 PM   #8 (permalink)
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by satyamy
Yes
long long ago
I was searching for Feedback form Code
so i refered this thread
Want to create Feedback form.........?
Need Codes.........

Need a code...

Help with Code

but didnt find any solution
but finally
with the help of my friend Amitava
i got the correct feedback form code
but at that time i didnt have any website
now i created one website but that code is not working i have attached it here
Pls help me...........
I have also tried it on my site. It gives some redirection error. I checked the PHP code, still i dont find any error in it. Can you give some screenshot of the error. I use Opera, so it auto-redirects.
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline  
Old 20-04-2007, 11:48 PM   #9 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: PHP Feedback form not working........?

hey satyam can u tell me exactly what u want ur feedback form to do , then i'll programm one for ya .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline  
Old 21-04-2007, 12:07 AM   #10 (permalink)
Alive Again...
 
satyamy's Avatar
 
Join Date: May 2005
Location: Mumbai
Posts: 1,668
Default Re: PHP Feedback form not working........?

thanks a lot my dear friends
but again with the help my Friend Amitava i got the correct feedback form & it started working

Actually I wanted a Form in which their must be column Name, Email & Comment
& when a user fill the form & press submit than it mails the whole detail to my email id
So now i got the form
Now i am making a Javascript
so that if their is any field left blank than it will tell the user abt this before going to internet
anyways thanks

here's the codes

feedback.html
Quote:
<HTML>
<HEAD>
<TITLE> Feedback </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">

<!-- CSS Begin //-->
<STYLE type=text/css>

.f8 {FONT-SIZE: 8pt; FONT-FAMILY: arial}
.f9 {FONT-SIZE: 9pt; FONT-FAMILY: arial}
.f10 {FONT-SIZE: 10pt; FONT-FAMILY: arial}
.f11 {FONT-SIZE: 11pt; FONT-FAMILY: arial}

</STYLE>
<!-- CSS Ends //-->

</HEAD>

<BODY text=#000000 vLink=#d14F8F aLink=#005DA4 link=#005DA4 bgColor=#ffffff
leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<TABLE cellSpacing=0 cellPadding=0 width=778 border=1>
<TBODY>
<TR>
<TD height=60 width="20"></td>
<TD height=60 width="738">
<img src="images/logo.gif"></img></TD>
<TD height=60 width="20"></td>
</TR>
</TBODY>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=778 border=1>
<tbody>
<TR>
<TD height=30 width=778 bgcolor=999999 colspan=4></TD>
</TR>
<TR>
<TD width=778 height=25 bgcolor=CCCCCC style="BORDER-TOP: #ffffff 1px solid" class=f10 align="center" vAlign="center" colspan=4> FEEDBACK FORM
</TD>
<tr>
<TD width=778 height=300 bgcolor=CCCCCC class=f10 align="center" vAlign="top">
<br>
<form name="feedback" method="POST" action="feedback.php">
Name <input name="name" type="text"><br><br>
Email&nbsp; <input name="email" type="text"><br><br>
Phone <input name="phone" type="text"><br><br>
Feedback&nbsp;&nbsp;&nbsp;&nbsp; <textarea name="comments"></textarea><BR><br>
<input name="formbutton" type="submit" value="Submit">
<input name="formbutton2" type="reset" value="Reset">
</form>
</TD>
<tr>
</TR>
<TR>
<TD width=778 height=30 valign="top" bgcolor=999999 colspan=4>
</TD>
</TR>
</BODY>
</HTML>
feedback.php
Quote:
<?

// ------------- CONFIGURABLE SECTION ------------------------

// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;

$mailto = 'youremailaddress@example.com' ;

// $subject - set to the Subject line of the email, eg
//$subject = "online contact form" ;

$subject = "online contact form" ;


$formurl = "feedback/form.html" ;
$errorurl = "feedback/error.html" ;
$thankyouurl = "feedback/thankyou.html" ;

// -------------------- END OF CONFIGURABLE SECTION ---------------

$name = $_POST['name'] ;
$email = $_POST['email'] ;
$phone = $_POST['phone'] ;
$comments = $_POST['comments'] ;

$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($phone) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
$name = strtok( $name, "\r\n" );
$email = strtok( $email, "\r\n" );
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}

$messageproper ="This message was sent from:\n" .
"$http_referrer\n" .

"NAME:\n" .
$name .
"\n" .
"\n" .
"EMAIL ID:\n" .
$email .
"\n" .
"\n" .
"PHONE NO:\n" .
$phone .
"\n" .
"\n" .

"------------------------- Enquiry -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;

mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\r\nReply-To: \"$name\" <$email>\r\nX-Mailer: chfeedback.php 2.04" );
header( "Location: $thankyouurl" );
exit ;

?>
error.html
Quote:
error!!!. please fill in the details
thankyou.html
Quote:
Thank you. we will get in touch with you shortly.
Quote:
Originally Posted by Zeeshan Quireshi
hey satyam can u tell me exactly what u want ur feedback form to do , then i'll programm one for ya .
thanks for the help
i have created one form which has javascript in it
so when a user press sumbit it identify which field is blank & which one is wrong
& at the same time give the error
but the form which i have given here use internet
i.e.
after pressing sumbit it sumbit the form use internet connection check & tells the error

can you tell me how i can integrate both form

So that at pressing submit button the person get error about the blank field without using internet connection

because this will save time


here's the code for Javascript Form
Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="JavaScript">
<!--
function validate()
{
n1=document.form1.txt_name.value
p1=document.form1.txt_phone.value
e1=document.form1.txt_email_id.value
c1=document.form1.txt_comment.value


if(n1=="")
{
alert("Enter Your Name")
document.form1.txt_name.focus();
return false
}
else
{
for(i=0;i<n1.length;i++)
{
if ((n1.charAt(i)>'Z') && (n1.charAt(i)<'a') || (n1.charAt(i)<'A') ||
(n1.charAt(i)<'A'))
{
alert("Enter a Valid Name")
document.form1.txt_name.focus()
return false
}
}
}



if(p1=="")
{
alert("Enter Your Phone Number")
document.form1.txt_phone.focus();
return false
}
else
{
for(j=0;j<p1.length;j++)
{
if
((p1.charAt(j)<'0' || p1.charAt(j)>'9'))
{
alert("Enter a Valid Phone Number")
document.form1.txt_phone.focus()
return false
}
if (p1.length!=12 && p1.length!=8)
{
alert("Phone Number Must Contain 8 or 12 digit only")
document.form1.txt_phone.focus()
return false
}
}
}


if(e1=="")
{
alert("Enter Your Email ID")
document.form1.txt_phone.focus();
return false
}

if(c1=="")
{
alert("Please Enter Your Message")
document.form1.txt_phone.focus();
return false
}
}





-->
</script>
</HEAD>

<BODY>
<form id="contactus_form" action="feedback.php" method="post" name="form1">
<div align="center"><br>
&nbsp;&nbsp;&nbsp;<span class="fstyle">Name</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;
<input name="txt_name" type="text" class="textfield" id="name" value="" size="25" maxlength="255">
<br>
<br>
&nbsp;&nbsp;&nbsp;<span class="fstyle">Phone </span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;
<input name="txt_phone" type="text" class="textfield" id="name" value="" size="25" maxlength="255">
<br>
<br>
&nbsp;&nbsp;&nbsp;<span class="fstyle">Email ID </span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;
<input name="txt_email_id" type="text" class="textfield" id="name" value="" size="25" maxlength="255">
<br>
<br>
&nbsp;&nbsp;&nbsp;<span class="fstyle">Website</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;
<input name="txt_website" type="text" class="textfield" id="name" value="" size="25" maxlength="255">
<br>
<br>
&nbsp;&nbsp;&nbsp;<span class="fstyle">Comment</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<textarea name="txt_comment" cols="25" rows="3" class="fstyle" id="name"></textarea>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<input type="submit" name="Button" value="Submit" onClick="validate()";>
&nbsp;
<input type="reset" name="submit2" value="Reset">
</div>
</FORM>
</BODY>
</HTML>

Last edited by satyamy; 21-04-2007 at 12:07 AM. Reason: Automerged Doublepost
satyamy is offline  
Old 21-04-2007, 10:33 AM   #11 (permalink)
Host4Cheap.org
 
Sukhdeep Singh's Avatar
 
Join Date: May 2005
Location: Digit Forum
Posts: 2,102
Default Re: PHP Feedback form not working........?

Why not make a form using PHP Form Generator. You can easily install using Fantastico which might be there in your cPanel.

If not Download and run it from http://phpformgen.sourceforge.net/
__________________
★ Want to start your Website, No worries - here is how ★
http://www.thinkdigit.com/forum/showthread.php?t=66717

★ Host4Cheap - cPanel Webhosting & Reseller Plans ★
http://www.host4cheap.org/
Sukhdeep Singh is offline  
Old 21-04-2007, 12:57 PM   #12 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: PHP Feedback form not working........?

well i think it would be btter if u checked for empty fields coz many ppl these days hv javascript disabled in their browser n it can easily be bypassed , checking it on the server level is the best option .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline  
Old 21-04-2007, 05:47 PM   #13 (permalink)
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by Zeeshan Quireshi
well i think it would be btter if u checked for empty fields coz many ppl these days hv javascript disabled in their browser n it can easily be bypassed , checking it on the server level is the best option .
You are right. If Satayam wouldn't have got hlp; i would have programmed a simple feedback form in PHP for him. It wud have no js. Complete Server Side validation.
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline  
Old 22-04-2007, 12:59 PM   #14 (permalink)
eWebGuru
 
ahref's Avatar
 
Join Date: Mar 2006
Location: Dehradun
Posts: 427
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by Zeeshan Quireshi
well i think it would be btter if u checked for empty fields coz many ppl these days hv javascript disabled in their browser n it can easily be bypassed , checking it on the server level is the best option .
I don't think many people disable js, as all web 2.0 sites are dependent on js, and ajax is also dependent on js.

However in bots js is disabled.
__________________
Windows and linux hosting at http://www.ewebguru.com
Get $50 per blog post PM me for details.
ahref is offline  
Old 22-04-2007, 01:43 PM   #15 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by ahref
I don't think many people disable js, as all web 2.0 sites are dependent on js, and ajax is also dependent on js.

However in bots js is disabled.
well mate even if 1% ppl hv js disabled then it's a prob , y not check on server which is 100% guaranteed to work .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline  
Old 22-04-2007, 02:40 PM   #16 (permalink)
Host4Cheap.org
 
Sukhdeep Singh's Avatar
 
Join Date: May 2005
Location: Digit Forum
Posts: 2,102
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by sukhdeepsinghkohli
Why not make a form using PHP Form Generator. You can easily install using Fantastico which might be there in your cPanel.

If not Download and run it from http://phpformgen.sourceforge.net/
I will still stay with this
__________________
★ Want to start your Website, No worries - here is how ★
http://www.thinkdigit.com/forum/showthread.php?t=66717

★ Host4Cheap - cPanel Webhosting & Reseller Plans ★
http://www.host4cheap.org/
Sukhdeep Singh is offline  
Old 22-04-2007, 04:01 PM   #17 (permalink)
eWebGuru
 
ahref's Avatar
 
Join Date: Mar 2006
Location: Dehradun
Posts: 427
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by Zeeshan Quireshi
well mate even if 1% ppl hv js disabled then it's a prob , y not check on server which is 100% guaranteed to work .
To use on server side is good, but doing it for 1% people I don't agree, there are more than 1% people who don't use cookies, but cookies plays important part in functioning of many sites. No one cares for those 1%.

Even adsense and adwords login did not work, if js is disabled. You have to enable it if you want to use it.
__________________
Windows and linux hosting at http://www.ewebguru.com
Get $50 per blog post PM me for details.
ahref is offline  
Old 24-04-2007, 08:55 PM   #18 (permalink)
Alive Again...
 
satyamy's Avatar
 
Join Date: May 2005
Location: Mumbai
Posts: 1,668
Cool Re: PHP Feedback form not working........?

Quote:
Originally Posted by sukhdeepsinghkohli
Why not make a form using PHP Form Generator. You can easily install using Fantastico which might be there in your cPanel.

If not Download and run it from http://phpformgen.sourceforge.net/
ohh yes thanks found Fantastico mila in my cpanel

I will test every thing you friends are tell & will mail the final result & what i have selected
satyamy is offline  
Old 25-04-2007, 06:12 PM   #19 (permalink)
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: PHP Feedback form not working........?

Quote:
Originally Posted by satyamy
ohh yes thanks found Fantastico mila in my cpanel

I will test every thing you friends are tell & will mail the final result & what i have selected
Mail?? How??
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to create Feedback form.........? satyamy QnA (read only) 15 10-01-2007 09:07 PM
Where form i bought this ? Deep_Peep QnA (read only) 2 28-02-2006 08:42 PM
convert form Xvid.AC3 to VCD dat.How?? bharat_r QnA (read only) 12 13-06-2005 08:39 AM
Email from html form...please help club_pranay Internet & WWW 4 08-06-2005 12:37 PM
Form Factor adorablesrini QnA (read only) 2 20-01-2005 03:19 PM

 
Latest Threads
- by Tenida
- by Charan
- by abhidev

Advertisement




All times are GMT +5.5. The time now is 09:59 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2