473,651 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Novice - Help with a page.

Ben
The page below isn't picking up details or location.

What have I missed?
Thanks in advance,

Ben
_______________ _______________ ______________
<?PHP

include ("bdc_functions .php");
include ("user_function s.php");

session_registe r("srFIRSTNAME" );
session_registe r("srSURNAME" );
session_registe r("srTELEPHONE" );
session_registe r("srEMAILADDR" );
session_registe r("srLOCATION") ;
session_registe r("srDETAILS" );
session_registe r("srPAGE_NUM") ;

include ("bdc_intranet_ connect.php");

bdc_small_heade r("Health Safety and Maintenance Logging");

function log_a_call_form ( $SELF, $PAGE_NUM ) {

?>

<title></title>
<H2>Health Safety and Maintenance Logging System</H2>

<?PHP

if ($PAGE_NUM == 1) {
global $srFIRSTNAME;
global $srSURNAME;
global $srTELEPHONE;
global $srEMAILADDR;

?>
<table width="95%" border="0" align="center">
<tr>
<td height="48"><h5 >Please complete this form to log any issues
relating to health, safety and maintenance around the Bromsgrove
District Council offices.</h5>
</td>
</tr>
</table>

<H5>Contact Details.</H5>
<table width="95%" border="0" align="center">
<tr>
<td height="48"></td><P>This form will be filled in with details
obtained from your intranet log on details.<br>Ple ase change these
details if they are incorrect.</P>
</td>
</tr>
</table>

<DIV>
<FORM ACTION=<?PHP echo $SELF ?> METHOD=POST NAME=PAGE_1>
<TABLE width="496">
<TR>
<TD width="113" ALIGN=RIGHT>Fir st name</TD>
<TD width="10" ALIGN=RIGHT>&nb sp;</TD>
<TD width="357"><IN PUT TYPE=TEXT NAME=FIRSTNAME VALUE="<?PHP
echo $srFIRSTNAME?>" SIZE=20 MAXLENGTH=20></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>Sur name</TD>
<TD ALIGN=RIGHT>&nb sp;</TD>
<TD><INPUT TYPE=TEXT NAME=SURNAME VALUE="<?PHP echo
$srSURNAME?>" SIZE=20 MAXLENGTH=20></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>Tel ephone</TD>
<TD ALIGN=RIGHT>&nb sp;</TD>
<TD><INPUT TYPE=TEXT NAME=TELEPHONE VALUE="<?PHP echo
$srTELEPHONE?>" SIZE=15 MAXLENGTH=15></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>Ema il Address</TD>
<TD ALIGN=RIGHT>&nb sp;</TD>
<TD><INPUT TYPE=TEXT NAME=EMAILADDR VALUE="<?PHP echo
$srEMAILADDR?>" SIZE=50 MAXLENGTH=50></TD>
</TR>
</TABLE>
<BR>
<INPUT TYPE=SUBMIT NAME=NEXT_1 VALUE=Next>
</FORM>

<SCRIPT LANGUAGE="JAVAS CRIPT">
<!--
document.PAGE_1 .FIRSTNAME.focu s()
-->
</SCRIPT>

</DIV>

<H4 ALIGN=RIGHT>Pag e <?PHP echo $PAGE_NUM ?> of 3</H4>
<?PHP
}
?>

<?PHP

if ($PAGE_NUM == 2) {

global $srLOCATION;
global $srDETAILS;

?>
<H5>Informati on about the issue</H5>
<DIV>
<FORM ACTION=<?PHP echo $SELF ?> METHOD=POST NAME=PAGE_2>
<TABLE width="600" height="271">
<TR valign="middle" >
<TD height="31" ALIGN=right valign="middle" > Please enter the
location <BR>of the issue?</TD>
<TD ALIGN=center>&n bsp;</TD>
<TD width="277" align="left"><T EXTAREA NAME=LOCATION ROWS=5
COLS=40><?PHP echo $srLOCATION?></TEXTAREA>
</TD>
</TR>
<TR valign="middle" >
<TD height="117" ALIGN=right VALIGN=middle> Please enter
details <br>about the issue</TD>
<TD ALIGN=center>&n bsp;</TD>
<TD align="left"><T EXTAREA NAME=DETAILS ROWS=5 COLS=40><?PHP
echo $srDETAILS?></TEXTAREA></TD>
</TR>
</TABLE>
<BR>
<INPUT TYPE=SUBMIT NAME=BACK_2 VALUE=Back>
<INPUT TYPE=SUBMIT NAME=NEXT_2 VALUE=Next>
</FORM>

<SCRIPT LANGUAGE="JAVAS CRIPT">
<!--
document.PAGE_2 .focus()
-->
</SCRIPT>
</DIV>

<H4 ALIGN=RIGHT>Que stionnaire Page <?PHP echo $PAGE_NUM ?> of 3</H4>
<?PHP
}
?>

<?PHP

if ($PAGE_NUM == 3) {

global $srFIRSTNAME;
global $srSURNAME;
global $srTELEPHONE;
global $srEMAILADDR;
global $srLOCATION;
global $srDETAILS;
$DATE = date('jS F Y');
print "<H4>Confirmati on</H4>";
print "<H5>Click 'Back' to change anything, or press 'Submit' to
process the form</H5>";
print "<TD COLSPAN=3><HR></TD>";
print "<DIV>";
print "<TABLE>";
print "<TR>";
print "<TD ALIGN=RIGHT>Con tact Name: </TD>";
print "<TD WIDTH=5></TD>";
print "<TD>" . trim($srFIRSTNA ME) . " " . trim($srSURNAME ) .
"</TD>";
print "</TR>";
print "<TR>";
print "<TD ALIGN=RIGHT>Tel ephone: </TD>";
print "<TD WIDTH=3></TD>";
print "<TD>$srTELEPHO NE</TD>";
print "</TR>";
print "<TR>";
print "<TD ALIGN=RIGHT>E-Mail Address: </TD>";
print "<TD WIDTH=3></TD>";
print "<TD>$srEMAILAD DR</TD>";
print "</TR>";
print "<TR>";
print "<TD COLSPAN=3><HR></TD>";
print "</TR>";
print "<TR>";
print "<TD ALIGN=RIGHT>Dat e Logged:</TD>";
print "<TD WIDTH=3></TD>";
print "<TD>$DATE</TD>";
print "</TR>";
print "<TR>";
print "<TD COLSPAN=3><HR></TD>";
print "</TR>";
print "<TR>";
print "<TD VALIGN=TOP ALIGN=RIGHT>Iss ue Location:</TD>";
print "<TD WIDTH=3></TD>";
print "<TD><PRE>$srLO CATION</PRE></TD>";
print "</TR>";
print "<TR>";
print "<TD VALIGN=TOP ALIGN=RIGHT>Iss ue Details:</TD>";
print "<TD WIDTH=3></TD>";
print "<TD><PRE>$srDE TAILS</PRE></TD>";
print "</TR>";
print "</TABLE>";
print "</DIV>";
print "<BR>";
print "<DIV>";
print "<FORM ACTION=$SELF METHOD=POST NAME=PAGE_3>";
print "<INPUT TYPE=SUBMIT NAME=BACK_3 VALUE=Back>";
print "<INPUT TYPE=SUBMIT NAME=SAVE VALUE=Submit>";
print "</FORM>";
print "</DIV>";

}

?>

<?PHP
}
?>

<?PHP

$PAGE_NUM=0;
$dbh = db_connect();

if ($NEXT_1) {

$srFIRSTNAME=$F IRSTNAME;
$srSURNAME =$SURNAME;
$srTELEPHONE=$T ELEPHONE;
$srEMAILADDR=$E MAILADDR;

if (Empty($FIRSTNA ME)) {
print "<H2 CLASS=ERROR>You have not entered your
firstname</H2>";
$PAGE_NUM=1;
}
elseif (Empty($SURNAME )) {
print "<H2 CLASS=ERROR>You have not entered your
surname</H2>";
$PAGE_NUM=1;
}
elseif (Empty($TELEPHO NE)) {
print "<H2 CLASS=ERROR>You have not entered your telephone
number</H2>";
$PAGE_NUM=1;
}
elseif (Empty($EMAILAD DR)) {
print "<H2 CLASS=ERROR>You have not entered your email
address</H2>";
$PAGE_NUM=1;
}
else {
$PAGE_NUM=2;
}
}
if ($NEXT_2) {
$srLOCATION =$LOCATION;
$srDETAILS =$DETAILS;

if (Empty($LOCATIO N)) {
print "<H2 CLASS=ERROR>Ple ase enter a location</H2>\n";
$PAGE_NUM=2;
}
elseif (Empty($DETAILS )) {
print "<H2 CLASS=ERROR>Ple ase enter general information about
your call</H2>\n";
$PAGE_NUM=2;
}
else {
$PAGE_NUM=3;
}
)

if ($SAVE) {
$sql_str = "INSERT INTO hsm_details ( ";
$sql_str .= " logged_by ,";
$sql_str .= " telephone ,";
$sql_str .= " emailaddr ,";
$sql_str .= " location ,";
$sql_str .= " details ,";
$sql_str .= " logged_at )";
$sql_str .= "VALUES ( ";
$sql_str .= " '$srFIRSTNAME' '$srSURNAME', ";
$sql_str .= " '$srTELEPHONE', ";
$sql_str .= " '$srEMAILADDR', ";
$sql_str .= " '$srLOCATION', ";
$sql_str .= " '$srDETAILS' ,";
$sql_str .= " now() ) ";

print $sql_str;
$result = pg_exec($dbh, $sql_str);

$sql_str = "SELECT currval('hsm_se q') as next_hsm_id";
$result = pg_exec($dbh, $sql_str);
$row = pg_fetch_array( $result, 0);

$HSM_REF = " " . trim($row[next_hsm_id]);

$SUBJECT = "Health, Safety and Maintenance Issue Logged";
$BODY = "This email confirms that your issue has been logged and
passed on to Direct Services. Thank you for your time. If you need any
other information or help - please call....";

$full_name = get_full_name($ LOGIN_ID);
$email_addr = trim(get_user_e mail(get_user_n ame($LOGIN_ID)) ) .
"@..........gov .uk" ;
$mail_from = "$full_name <" .
get_user_email( get_user_name($ LOGIN_ID)) .">";
$message = "A new Health, Safety and Maintenance issue has been
logged. Ref $HSM_REF" ;
mail("b.*****@b romsgrove.gov.u k", "New Health, Safety and
Maintenance Issue Logged", $message, "From: $mail_from" );
mail("$email_ad dr", $SUBJECT, $BODY);

session_unregis ter("srFIRSTNAM E");
session_unregis ter("srSURNAME" );
session_unregis ter("srTELEPHON E");
session_unregis ter("srEMAILADD R");
session_unregis ter("srLOCATION ");
session_unregis ter("srDETAILS" );
session_unregis ter("srPAGE_NUM ");

?>

<H5>Confirmatio n</H5>
<P>Thank you for loggin an issue.<BR>
<BR>
<P>Your logged issue has been submitted and passed on to Direct
Services.<BR>
<BR>
<DIV>
<FORM>
<INPUT TYPE=BUTTON VALUE="Close" NAME=CLOSE
onclick="window .close()">
</FORM>
</DIV>

<?PHP
$PAGE_NUM=99;
}

if ($BACK_3) { $PAGE_NUM=2; }
if ($BACK_2) { $PAGE_NUM=1; }

if ($PAGE_NUM==0) {
$sql_str = "SELECT forename, surname, telephone, email ";
$sql_str .= "FROM Users ";
$sql_str .= "WHERE id = $LOGIN_ID";

$result = pg_exec( $dbh, $sql_str );

$my_row = pg_fetch_array( $result, 0 );

$srFIRSTNAME=tr im($my_row[forename]);
$srSURNAME =trim($my_row[surname]);
$srTELEPHONE=tr im($my_row[telephone]);
$srEMAILADDR=tr im($my_row[email]) . "@........gov.u k";

$PAGE_NUM=1;
}

if ( $PAGE_NUM < 7) {
log_a_call_form ($PHP_SELF, $PAGE_NUM);
}
?>
Jul 17 '05 #1
2 2662

"Ben" <be******@zoom. co.uk> wrote in message
news:3e******** *************** ***@posting.goo gle.com...
The page below isn't picking up details or location.

What have I missed?
Thanks in advance,

Ben
_______________ _______________ ______________
<?PHP

include ("bdc_functions .php");
include ("user_function s.php");


<snipped>

Your question is unclear... how do you mean "not picking up details or
location"... What variables do you expect to be picked up and making the
assumption that you are forms processing, have you tried dumping your form
to a phpinfo() output and then checking for whatever info that you are
missing?
Jul 17 '05 #2
"Ben" <be******@zoom. co.uk> wrote in message
news:3e******** *************** ***@posting.goo gle.com...
The page below isn't picking up details or location.

What have I missed?


Perhaps you should narrow the problem down to a series of lines, or a subset
of your code and repost the snippet. Nobody wants to read through a 100
lines of code to work out exactly where the problem lies when you've got
such a large script that is multiple pages and that would take somebody a
long time to test.

Paulus
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1726
by: Christopher Richards | last post by:
It is possible to be able to receive email alerts (say, from Google News) and publish them to a web page automatically? I am a novice as far as PHP goes, but I can open and write to a file and close the file up again. The html page references the file and can format the plain text. So far I am OK ( I think ). I am not sure how I would automate, or get the content of the email, and output it to a file. Any thougths? Thank you.
2
1993
by: Ewa | last post by:
Hello I have inherited a www service after someone, I have problems with PHP parts. As I am complete novice. I will be very greatful for your help - I did not managed to find an answer myself. My questions are trivial, I guess. The service is now being moved to another server (PHP 4) and also I would like to run it on my local WAMP (PHP 5) for tests. 1. There's a directory defined there called php_base, which is the root
5
2363
by: Marian | last post by:
Hi, I am totaly novice in .NET and I am studying a book about this. There was mentioned "assembly". I did not understand, how function does it has . I would like to know the exact run of code (intermediate language and so on). Is there any page on internet, which makes me clear? Thanx
2
5044
by: OysterCracker | last post by:
Hi - My js knowledge is pretty much cut-'n-paste, and I'd appreciate a little guidance.I have a simple splash webpage that includes an embedded ..wav file of about 60kb. Currently, some dial-up users have pretty much completed viewing the page before the .wav file starts playing. I'd like to delay opening the page until the .wav file has loaded, so that the music starts about when the viewer first sees the page. I know there's a risk of...
21
2930
by: AES/newspost | last post by:
My understanding -- I'm not an expert -- is that on (some? many? all?) standard Internet servers a URL can point to a subdirectory name followed by a backslash, and that links to this URL will automatically go to an "index.html" file located in that subdirectory, if there is one. Q1: Is this more or less correct? At least some HTML texts also recommend using this as the basis for organizing a web site: Put the web pages associated...
17
2628
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in directly. so I need a way doing this. so I check to see if the ifp value is null and if so then assign it a value. is this correct?
6
3179
by: Sean | last post by:
HI There, I am making the transition from asp to asp .net, I am currenty writing an application that requires a bulk insert from a webform into SQL server, normally I would just create rows of html textboxes and then use the Request.Form.Count property to collect each field. What I would like to know is what is a good way of doing this in asp.net? Do I need to create an array of textboxes or can I do this fro a datagrid?
4
1649
by: trond | last post by:
Hello all, Before I start I'd like to point out that I am a complete novice when it comes to asp.net - My background is in network and operating systems, and although I have been doing a bit of hobby programming in vb.net and web programming in asp/vbscript in the past, I am pretty much a beginner at asp.net. What I'm trying to do, is to take the "PersonalHomePage" starter kit that MS supplies with VS2005 and tweak it a bit, to make it...
0
1333
by: waggledance | last post by:
I was wondering if anyone here might be able to offer me some advice for someone who can only use Macromedia Dreamweaver MX. I am (clearly!) a web design novice so apologies in advance if this is a silly question. I have been asked to build a website to specifications provided by a graphic designer at very short notice. The specifications include the visual appearance of the page, set out with pixel widths, locations of graphics, fonts, etc....
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.