954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Old perl site - need help with code

I think this should be easy but I'm not a techy.
Problem: The checkout screen on my site allows the logged in user to change their address details but doesn't appear to update the stored data before sending them off to the payment service provider.
The code on the CGI checkout page is:
print ("


Please confirm your address details
Change any fields as necessary, then click the button to continue.\n");

print ("<TABLE BORDER=1 ALIGN=CENTER>");
		print ("<TR><TD>Full name:</TD><TD><INPUT TYPE=TEXT NAME=fullname VALUE=\"$custdata{'fullname'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>Address:</TD><TD><INPUT TYPE=TEXT NAME=address1 VALUE=\"$custdata{'address1'}\" SIZE=30></TD></TR>");
		print ("<TR><TD> </TD><TD><INPUT TYPE=TEXT NAME=address2 VALUE=\"$custdata{'address2'}\" SIZE=30></TD></TR>");
		print ("<TR><TD> </TD><TD><INPUT TYPE=TEXT NAME=address3 VALUE=\"$custdata{'address3'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>Postcode:</TD><TD><INPUT TYPE=TEXT NAME=postcode VALUE=\"$custdata{'postcode'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>Telephone:</TD><TD><INPUT TYPE=TEXT NAME=phone VALUE=\"$custdata{'phone'}\" SIZE=16></TD></TR>");
		print ("<TR><TD>E-mail: </TD><TD><INPUT TYPE=TEXT NAME=email VALUE=\"$custdata{'email'}\" SIZE=30></TD></TR>");
		print ("</TABLE>");

		print "<TABLE ALIGN=CENTER>";
		print ("<TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT VALUE=\"Continue to next stage\"></TD></TR>");
		print ("</TABLE>");
		print ("</FORM>");


If it's any help, the code to update details from within the customer account CGI page is:

print ("<P><FONT SIZE=+1>You may update your address details here.</FONT><BR>Change any fields as needed, then press UPDATE.\n");
		print ("<FORM ACTION=\"${cgibin}accountstatus.cgi\" METHOD=POST>");
		print ("<INPUT TYPE=HIDDEN NAME=actn VALUE=update>");
		print ("<INPUT TYPE=HIDDEN NAME=username VALUE=$form{'username'}>");
		print ("<INPUT TYPE=HIDDEN NAME=password VALUE=$form{'password'}>");
		print ("<TABLE BORDER=1 ALIGN=CENTER>");
		print ("<TR><TD>Full name:</TD><TD><INPUT TYPE=TEXT NAME=fullname VALUE=\"$custdata{'fullname'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>Address:</TD><TD><INPUT TYPE=TEXT NAME=address1 VALUE=\"$custdata{'address1'}\" SIZE=30></TD></TR>");
		print ("<TR><TD> </TD><TD><INPUT TYPE=TEXT NAME=address2 VALUE=\"$custdata{'address2'}\" SIZE=30></TD></TR>");
		print ("<TR><TD> </TD><TD><INPUT TYPE=TEXT NAME=address3 VALUE=\"$custdata{'address3'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>Postcode:</TD><TD><INPUT TYPE=TEXT NAME=postcode VALUE=\"$custdata{'postcode'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>Telephone: </TD><TD><INPUT TYPE=TEXT NAME=phone VALUE=\"$custdata{'phone'}\" SIZE=30></TD></TR>");
		print ("<TR><TD>E-mail: </TD><TD><INPUT TYPE=TEXT NAME=email VALUE=\"$custdata{'email'}\" SIZE=30></TD></TR>");
		print ("<TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT VALUE=\"Click to update\"></TD></TR>");
		print ("</TABLE>");
		print ("</FORM>");


I'm pretty sure that the line I want is:
print ("");
from the accountstatus CGI page but can I just insert it into the checkout CGI page??

Dustymunchkin
Newbie Poster
6 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

Resolved. Being non techy and having no offline version to work on I was a bit nervous of messing up the live site but I bit the bullet and inserted the line I had referred to and it worked. Database now updates on 'continue'. Thanks anyway!

Dustymunchkin
Newbie Poster
6 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: