%@ page language="PL/SQL" errorPage="error.psp"%> <%@ plsql procedure="cust_dets" %> <%@ plsql parameter="cust_id" type="number" %> <% /**************************************************/ /* The cust_dets psp is used to allow a customer */ /* to either register with the site or amend data */ /* stored for them. */ /* */ /* If the cust_id parameter contains a value then */ /* it will be assumed that this is a customer */ /* returning to amend their details and the form */ /* will be populated. Otherwise a blank form will */ /* be displayed */ /**************************************************/ %> <%! firstname varchar2(30); lastname varchar2(30); housename varchar2(30); address1 varchar2(30); address2 varchar2(30); town varchar2(30); region varchar2(30); zip varchar2(10); country_id number(2); %> <% if cust_id is not null then select firstname, lastname, housename, address1, address2, town, region, zip, country_id into firstname, lastname, housename, address1, address2, town, region, zip, country_id from cust where id = cust_id; end if; %>
Please enter your details.
<% else %>Please amend your details.
<% end if; %> <% if cust_id is not null then %> <% else %> <% end if; %>