Click to See Complete Forum and Search --> : Carry a java cookie and using cgi?


Ultimatepcmedic
09-05-2003, 12:39 PM
Hello I am trying to carry a java cookie from one form to another Below is a copy of the form I am using if I put the cookie form type first it sends the cookie but will not right to the cgi db file, and just the other wya if I put the cgi form tag. I am new to most of this. Below is what I have. Thank you for all your help....

<!-- Start fields for writing to Cgi Script and send cookies -->
<!-- With this example below I can write to the database but not the cookie -->
<!-- If I reverse the lines 179 and 180 I can send the cookie but not write to the DB -->
<form type=get action="simple2.html">
<form action="http://www.ultimatepcmedic.com/cgi-bin/datascript.pl" method="get">
<!-- End Fields for send cookies and Cgi to Db files -->
<input type="hidden" name="recipient" value="mike@ultimatepcmedic.com">
<input type="hidden" name="redirect" value="http://ultimatepcmedic.com/simple2.html">
<input type="hidden" name="required" value="">
<!--Append Database fields -->

<input type="hidden" name="append_db" value="/xitami/webpages/ultimatepcmedic.com/simplecredit/formdata/simple1.dat">
<input type="hidden" name="db_delimiter" value=",">
<input type="hidden" name="db_fields" value="realname,lastname,email,address1,address2,city,state,homephone,workphone">
<!-- End Append Database Fields -->
<!-- End for writing to Cgi Script -->
<DIV align=center><FONT face="Tahoma, Arial, Helvetica, sans-serif"
size=2>I want to receive additional credit offers. <INPUT type=checkbox
CHECKED value=Y name=creditoffersoptin> </FONT><BR><BR></DIV>
<TABLE cellSpacing=0 cellPadding=1 width=600 align=center border=0>
<TBODY>
<TR>
<TD align=left width="57%"><IMG height=30
src="images/form_top.gif"
width=330><BR></TD>
<TD vAlign=center align=right bgColor=white><A href="http:www.simplecreditplus.com"><IMG
height=22 src="images/security.gif"
width=24 border=0></A> </TD>
<TD vAlign=center align=left><FONT face=arial color=#092362
size=1>This Site Uses Secure Technology</FONT></TD></TR>

<TR bgColor=#C5C6FC>
<TD align=middle colSpan=3>
<TABLE cellSpacing=0 cellPadding=3 width=599 border=0>
<TBODY>
<tr bgcolor="#C5C6FC">
<td colspan=4><img src="images/clear.gif" height=1><br>
<TR>
<TD align=left bgColor=white><FONT color=#000000><STRONG><FONT
face=arial size=2>First Name:</FONT></STRONG><BR><INPUT
maxLength=30 name=realname> </FONT></TD>
<TD align=left bgColor=white colSpan=2>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD><FONT color=#000000><STRONG><FONT face=arial
size=2>Last Name:</FONT></STRONG><BR><INPUT maxLength=30
name=lastname> </FONT></TD></TR></TBODY></TABLE></TD>
<TD align=left bgColor=white><FONT color=#000000><STRONG><FONT
face=arial size=2>Email: </FONT></STRONG><FONT face=arial
size=2>(i.e: name@url.com)</FONT></FONT> <FONT
color=#000000><BR><INPUT maxLength=80 size=26 name=email>
</FONT></TD></TR>
<TR>
<tr bgcolor="#C5C6FC">
<td colspan=4><img src="images/clear.gif" height=1></TD></TR>
<TR>
<TD align=left bgColor=white colSpan=2><FONT
color=#000000><STRONG><FONT face=arial size=2>Street Address
Line 1:</FONT></STRONG><BR><INPUT maxLength=80 size=30
name=address1> </FONT></TD>
<TD align=left bgColor=white colSpan=2><FONT
color=#000000><STRONG><FONT face=arial size=2>Street Address
Line 2:</FONT></STRONG><BR><INPUT maxLength=80 size=30
name=address2> </FONT></TD></TR>
<TR>
<tr bgcolor="#C5C6FC">
<td colspan=4><img src="images/clear.gif" height=1></TD></TR>
<TR>
<TD align=left bgColor=white colSpan=2><FONT
color=#000000><STRONG><FONT face=arial
size=2>City:</FONT></STRONG><BR><INPUT maxLength=30 size=30
name=city> </FONT></TD>
<TD align=left bgColor=white colSpan=2>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><FONT color=#000000><STRONG><FONT face=arial
size=2>State:</FONT></STRONG><BR><SELECT name=state>
<OPTION value=na selected>Choose:</OPTION> <OPTION
value=AK>AK</OPTION> <OPTION value=AL>AL</OPTION>
<OPTION value=AR>AR</OPTION> <OPTION
value=AZ>AZ</OPTION> <OPTION value=CA>CA</OPTION>
<OPTION value=CO>CO</OPTION> <OPTION
value=CT>CT</OPTION> <OPTION value=DC>DC</OPTION>
<OPTION value=DE>DE</OPTION> <OPTION
value=FL>FL</OPTION> <OPTION value=GA>GA</OPTION>
<OPTION value=HI>HI</OPTION> <OPTION
value=IA>IA</OPTION> <OPTION value=ID>ID</OPTION>
<OPTION value=IL>IL</OPTION> <OPTION
value=IN>IN</OPTION> <OPTION value=KS>KS</OPTION>
<OPTION value=KY>KY</OPTION> <OPTION
value=LA>LA</OPTION> <OPTION value=MA>MA</OPTION>
<OPTION value=MD>MD</OPTION> <OPTION
value=ME>ME</OPTION> <OPTION value=MI>MI</OPTION>
<OPTION value=MN>MN</OPTION> <OPTION
value=MO>MO</OPTION> <OPTION value=MS>MS</OPTION>
<OPTION value=MT>MT</OPTION> <OPTION
value=NC>NC</OPTION> <OPTION value=ND>ND</OPTION>
<OPTION value=NE>NE</OPTION> <OPTION
value=NH>NH</OPTION> <OPTION value=NJ>NJ</OPTION>
<OPTION value=NM>NM</OPTION> <OPTION
value=NV>NV</OPTION> <OPTION value=NY>NY</OPTION>
<OPTION value=OH>OH</OPTION> <OPTION
value=OK>OK</OPTION> <OPTION value=OR>OR</OPTION>
<OPTION value=PA>PA</OPTION> <OPTION
value=RI>RI</OPTION> <OPTION value=SC>SC</OPTION>
<OPTION value=SD>SD</OPTION> <OPTION
value=TN>TN</OPTION> <OPTION value=TX>TX</OPTION>
<OPTION value=UT>UT</OPTION> <OPTION
value=VA>VA</OPTION> <OPTION value=VT>VT</OPTION>
<OPTION value=WA>WA</OPTION> <OPTION
value=WV>WV</OPTION> <OPTION
value=WY>WY</OPTION></SELECT> </FONT></TD>
<TD><FONT color=#000000><STRONG><FONT face=arial
size=2>Zipcode:</FONT></STRONG><BR><INPUT maxLength=5
size=6 name=zip> </FONT></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<tr bgcolor="#C5C6FC">
<td colspan=4><img src="images/clear.gif" height=1></TD></TR>
<TR>
<TD align=left bgColor=white colSpan=2><FONT
color=#000000><STRONG><FONT face=arial size=2>Home Phone (ie:
999-555-1212):</FONT></STRONG><BR><INPUT maxLength=14 size=14
name=homephone> </FONT></TD>
<TD align=left bgColor=white colSpan=2><FONT
color=#000000><STRONG><FONT face=arial size=2>Work Phone (ie:
999-555-1212):</FONT></STRONG><BR><INPUT maxLength=14 size=14
name=workphone> </FONT></TD></TR>
<TR>
<tr bgcolor="#C5C6FC">
<td colspan=4><img src="images/clear.gif" height=1></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<DIV align=center></DIV>
<DIV align=center><BR></DIV>
<CENTER><INPUT TYPE="image" height=25 width=130
src="images/continue.gif" border=0
name=submit><BR><BR><BR>
<FONT face="Tahoma, Arial, Helvetica, sans-serif" color=#999999
size=1>©</FONT></form><FONT color=#999999 size=1><B><FONT
face="Tahoma, Arial, Helvetica, sans-serif"> </FONT></B><FONT
face="Tahoma, Arial, Helvetica, sans-serif">2003. All Rights
Reserved.</FONT></FONT>
<br>
<FONT face="Tahoma, Arial, Helvetica, sans-serif"
color=#999999 size=1>Web Design By</FONT><FONT
face="Tahoma, Arial, Helvetica, sans-serif" color=#bb984c
size=2><BR><A href="http://www.ultimatepcmedic.com">Ultimate Pc Medic</a></FONT><BR></CENTER><BR></CENTER></FORM>
<CENTER>
<CENTER></CENTER></CENTER></TD></TR></TBODY></TABLE></BODY></HTML>

CyCo
09-05-2003, 04:04 PM
It appears that you are attempting to nest one form within another. This is incorrect.

Ultimatepcmedic
09-05-2003, 04:47 PM
I didn't even thinkof that! Duh Thank you very much however do you have a suggestion on how I can send a java cookie and use cgi in the same submit?