|
autumn1978 -> Prepopulate form and then update existing records (2/6/2006 12:13:01)
|
Hi, I have searched every single thread and have read every tutorial I could find, and still cannot get how to do this. I am using FP2003 and an Access 2003 db hosted on a windows server (of course!). The user logs into his account, and his email and password are passed via url querystring from page to page, thus displaying his pertinent information. Thus far, I have used the DRW to display the information, according to the variables in the url QueryString. However, on the "update account info" page, I'm hand-coding and all I want to do is have the form with their address, etc., prepopulate, according to the email and password already in the url, and then let them change it as necessary and update their record. On this page, I decided to hand code it as the drw needs too much assistance. The other problem is that I want them to be able to change their email and password, also. Here's my code, the database connection name is Database1 and the table name is user_info: <% DIM EMAIL1 EMAIL1 = Request.QueryString("EMAIL") DIM PASSWORD1 PASSWORD1 = Request.QueryString("PASSWORD") Set Catalog=Server.OpenObject("ADODB.user_info") Catalog.open "SELECT * FROM Catalog FIRSTNAME = '::FIRSTNAME::', LASTNAME = '::LASTNAME::', EMAIL = '::EMAIL::', PASSWORD = '::PASSWORD::', URL='::URL::', EXTENSION = '::EXTENSION::', HOSTINGTYPE = '::HOSTINGTYPE::', ADDRESS = '::ADDRESS::', ADDRESS2='::ADDRESS2::', CITY = '::CITY::', USSTATE = '::USSTATE::', CANADIANPROVINCE = '::CANADIANPROVINCE::', UKDISTRICTS = '::UKDISTRICTS::', COUNTRY = '::COUNTRY::', ZIP = '::ZIP::' WHERE EMAIL1='::EMAIL::' AND PASSWORD1 = '::PASSWORD::'", "DSN=DATABASE1" %> <html> <head> <title>Login to get your free domain name and free unlimited Windows web hosting</title> <style fprolloverstyle>A:hover {color: #FFFF00; font-weight: bold} </style> </head> <body bgcolor="#5EA5FF" link="#FFFFFF" vlink="#FFFF00" alink="#FFFF00"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="88" background="images/topbg1.jpg"> <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="770" height="156"> <param name="movie" value="08biz_2.swf"> <param name="quality" value="High"> <embed src="08biz_2.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="770" height="156" quality="High"></object> </td> </tr> <tr> <td height="47" background="images/top03bg.gif"><table width="770" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="166" align="left"><img src="images/latest.gif" width="166" height="47"></td> <td width="442"><img src="images/top04.gif" width="442" height="47"></td> <td><img src="images/special_1.gif" width="162" height="47"></td> </tr> </table></td> </tr> <tr> <td align="left" valign="top" background="images/bg.gif"> <table width="829" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="171" align="center" valign="top"><table width="148" height="100%" border="0" cellpadding="0" cellspacing="0" class="text"> <tr> <td height="404" valign="top" background="images/left_bg.gif"> <!--webbot bot="Include" U-Include="leftnav.html" TAG="BODY" --> </td> </tr> </table></td> <td align="left" valign="top"> <table width="905" border="0" cellpadding="0" cellspacing="0" class="text"> <tr> <td height="730" align="left" valign="top"> <form BOTID="0" METHOD="POST" action="UPDATEINFOQUERY.asp"> <input type="hidden" name="fpdbr_0_PagingMove" value=" |< "> <table BORDER="0" width="839" height="105"> <tr> <td width="833" valign="bottom"> <!--webbot bot="Include" U-Include="Login_Navbar.asp" TAG="BODY" --></td> </tr> <tr> <td width="833" valign="bottom"> <form method="POST" name="Update_Account_Info" action="AccountUpdate.asp" webbot-action="--WEBBOT-SELF--"> <table border="0" cellpadding="0" cellspacing="0" id="table4"> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> <font face="Verdana" size="2"><b>Update Information:</b></font></td> </tr> <tr> <td><font size="2">First Name:</font></td> <td> <input type="text" name="FIRSTNAME" size="20" tabindex="1" value=""<%=FIRSTNAME%>""></td> </tr> <tr> <td><font size="2">Last Name:</font></td> <td> <input type="text" name="LASTNAME" size="20" tabindex="2"></td> </tr> <tr> <td> <font face="Verdana" size="2">Email:</font></td> <td> <input type="text" name="EMAIL" size="20" tabindex="3"></td> </tr> <tr> <td> <font face="Verdana" size="2">Password:</font></td> <td> <input type="text" name="PASSWORD" size="6" tabindex="4" maxlength="6"></td> </tr> <tr> <td> <font face="Verdana" size="2">Domain Name:</font></td> <td> <input type="text" name="URL" size="20" tabindex="5"><select size="1" name="EXTENSION" tabindex="6"> <option>.COM</option> <option>.NET</option> <option>.ORG</option> </select></td> </tr> <tr> <td> <font face="Verdana" size="2">Hosting Type:</font></td> <td> <select size="1" name="HOSTINGTYPE" tabindex="7"> <option>WINDOWS</option> <option>UNIX</option> </select></td> </tr> <tr> <td> <font face="Verdana" size="2">Address:</font></td> <td> <input type="text" name="ADDRESS" size="20" tabindex="10"></td> </tr> <tr> <td> </td> <td> <input type="text" name="ADDRESS2" size="20" tabindex="12"></td> </tr> <tr> <td> <font face="Verdana" size="2">City:</font></td> <td> <input type="text" name="CITY" size="20" tabindex="13"></td> </tr> <tr> <td> <font face="Verdana" size="2">State: or</font></td> <td> <input type="text" name="USSTATE" size="20" tabindex="14"></td> </tr> <tr> <td> <font face="Verdana" size="2">Province: or</font></td> <td> <input type="text" name="CANADIANPROVINCE" size="20" tabindex="15"></td> </tr> <tr> <td> <font face="Verdana" size="2">UK District:</font></td> <td> <input type="text" name="UKDISTRICTS" size="20" tabindex="16"></td> </tr> <tr> <td> <font face="Verdana" size="2">Postal Code:</font></td> <td> <input type="text" name="ZIP" size="20" tabindex="17"></td> </tr> <tr> <td> <font face="Verdana" size="2">Country:</font></td> <td> <input type="text" name="COUNTRY" size="20" tabindex="18"></td> </tr> <tr> <td> </td> <td> <input type="submit" value="Submit" name="B3"></td> </tr> <tr> <td> </td> <td> </td> </tr> </table> <p> </p> </form> <p> </td> </tr> </table> </form> </td> </tr> <tr> <td valign="top"><p><img src="images/c_bg_1.gif" width="581" height="20"></p></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="36" background="images/bottom01bg.gif"><table width="770" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <!--webbot bot="Include" U-Include="bottom.htm" TAG="BODY" --></td> </tr> </table></td> </tr> </table> </body> </html>
|
|
|
|