PDA

View Full Version : Where to set error message in ABVFP?



WSBlue
06-28-2007, 07:04 PM
Hi! Naval,
I have read thorough setting up "errorpage" in ABVFP.
But I still don't understand where to create error message.
Ex. "Car Foto Not Uploaded Yet!"
that will be displayed in textarea window when upload fields are
missed to be uploaded.
Please advise. Thanks

navaldesign
06-28-2007, 09:38 PM
You can NOT, unless you know some coding. ABVFP in it's original form does NOT validate uploaded files. The one i made for you was a modified version with changes in the script core, adapted to the particular form (formulir).

WSBlue
06-29-2007, 10:05 AM
You can NOT, unless you know some coding. ABVFP in it's original form does NOT validate uploaded files. The one i made for you was a modified version with changes in the script core, adapted to the particular form (formulir).

Why my form needed a modified version,
Because there are upload fields and errror message not in English?

OK! Actually, I just want my errorpage be able to report error message as it is now, when photos are not uploaded.
And if whenever needed to change its layout and still be able to
do to the same.
Why I failed to do so when I changed its layout and what did I do wrong? And I did follow all instructions!

navaldesign
06-29-2007, 10:08 AM
Ok, once more. ABVFP does NOT perform validation for missing Upload files. This is why you can NOT set error messages for this type of fields.

WSBlue
06-29-2007, 10:17 AM
Ok, once more. ABVFP does NOT perform validation for missing Upload files. This is why you can NOT set error messages for this type of fields.

OK. it means I can not change errorpage layout anymore or add something like navigation bar or links anymore in it otherwise it will go wrong again if I do?

navaldesign
06-29-2007, 10:47 AM
This is a completely different issue. You CAN change the error page layaout as you wish, you CAN'T change the error messages or validate the upload fileds, unless you change the core code

WSBlue
06-29-2007, 10:53 AM
This is a completely different issue. You CAN change the error page layaout as you wish, you CAN'T change the error messages or validate the upload fileds, unless you change the core code

But when I changed its layout only, didn't change error message and set up its page as php, save as php and followed all intructuions. But still went WRONG. WHY and WHAT went wrong? Was it my processor, you said?

navaldesign
06-29-2007, 11:16 AM
Philips, you know that, because i have already explained it to you. I can't understand why you are asking me again.

WSBlue
06-29-2007, 06:28 PM
Philips, you know that, because i have already explained it to you. I can't understand why you are asking me again.

OK. One last question!
Is it anything to do with my computer and cause error to its script? And why others can be processed and this one can't. Thanks a lot.

navaldesign
06-29-2007, 09:04 PM
I can't know details about the editor you use to upload your pages.

WSBlue
07-04-2007, 08:18 PM
I can't know details about the editor you use to upload your pages.

Hi! Naval,
I tried to do my error page again and I also tried to understand what you have told me so I go over again and again and follow every step as instructed in your 3. Setting up the "errorpage" tutorial.
But it will never work.

I preview the error from BV and save as errropage.php. And This is the script that I get from View Source,

And This is the warning that I get when Formulir goes to errorpage.php without uploading Foto. And it also can' tell any error message in textarea window.

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/vhosts/beruang.biz/httpdocs/errorpage.php:2) in /home/httpd/vhosts/beruang.biz/httpdocs/errorpage.php on line 3

<?php
session_start();
$error-$_SESSION[error];
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>error</title>
<meta name="GENERATOR" content="Created by BlueVoda">
<style type="text/css">
div#container
{
width: 800px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
}
</style>
<style type="text/css">
a.style1:link {color: #0000FF;}
a.style1:visited {color: #800080;text-decoration: underline;}
a.style1:active {color: #FF0000;text-decoration: underline;}
a.style1:hover {color: #0000FF;text-decoration: underline;}
</style>
<style type="text/css">
img { behavior: url("pngfix.***"); }
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#073C70" vlink="#0000FF" alink="#073C70" style="scrollbar-face-color:#C0C0C0;scrollbar-arrow-color:#000000;scrollbar-3dlight-color:#C0C0C0;scrollbar-darkshadow-color:#000000;scrollbar-highlight-color:#FFFFFF;scrollbar-shadow-color:#808080;scrollbar-track-color:#C0C0C0;">
<div id="container">
<div id="bv_" style="position:absolute;left:169px;top:889px;width:143px ;height:71px;z-index:0" align="left">
<img src="bv01036.gif" id="Shape8" align="top" alt="" border="0" width="143" height="71"></div>
<div id="bv_" style="position:absolute;left:168px;top:193px;width:144px ;height:71px;z-index:1" align="left">
<img src="bv01024.gif" id="Shape6" align="top" alt="" border="0" width="144" height="71"></div>
<div id="bv_" style="position:absolute;left:168px;top:241px;width:504px ;height:695px;z-index:2" align="left">
<img src="bv01011.gif" id="Shape1" align="top" alt="" border="0" width="504" height="695"></div>
<div id="bv_" style="position:absolute;left:624px;top:241px;width:145px ;height:695px;z-index:3" align="left">
<img src="bv01045.gif" id="Shape4" align="top" alt="" border="0" width="145" height="695"></div>
<div id="bv_" style="position:absolute;left:0px;top:241px;width:47px;he ight:695px;z-index:4" align="left">
<img src="bv01023.gif" id="Shape5" align="top" alt="" border="0" width="47" height="695"></div>
<div id="bv_" style="position:absolute;left:23px;top:193px;width:167px; height:767px;z-index:5" align="left">
<img src="bv01013.gif" id="Shape3" align="top" alt="" border="0" width="167" height="767"></div>
<div id="bv_" style="position:absolute;left:41px;top:253px;width:134px; height:100px;z-index:6" align="center">
<table border="0" cellpadding="0" cellspacing="0" id="NavigationBar1">
<tr>
<td align="left" valign="top" width="134" height="22"><a href=" id="bv01028" src="bv01028.gif" alt="http://www.beruang.biz/perkenalan.htm (http://www.beruang.biz/perkenalan.htm)" align="top" border="0" width="134" height="22"></a></td>
</tr>
<tr><td height="4"></td></tr><tr>
<td align="left" valign="top" width="134" height="22"><a href=" id="bv01029" src="bv01029.gif" alt="http://www.beruang.biz/tanyajawab.htm (http://www.beruang.biz/tanyajawab.htm)" align="top" border="0" width="134" height="22"></a></td>
</tr>
<tr><td height="4"></td></tr><tr>
<td align="left" valign="top" width="134" height="22"><a href=" id="bv01030" src="bv01030.gif" alt="http://www.beruang.biz/formulir.htm (http://www.beruang.biz/formulir.htm)" align="top" border="0" width="134" height="22"></a></td>
</tr>
<tr><td height="4"></td></tr><tr>
<td align="left" valign="top" width="134" height="22"><a href=" id="bv01031" src="bv01031.gif" alt="http://www.beruang.biz/hubungikami.htm (http://www.beruang.biz/hubungikami.htm)" align="top" border="0" width="134" height="22"></a></td>
</tr>
</table>
</div>
<img src="bv01040.png" id="Image7" alt="" align="top" border="0" width="302" height="173" style="position:absolute;left:17px;top:25px;width:302px;h eight:173px;z-index:7">
<div id="bv_" style="position:absolute;left:196px;top:247px;width:597px ;height:20px;z-index:8" align="left">
<font style="font-size:15px;" color="#000000" face="Tahoma">
[<a href="http://" class="style1">A</a>]&nbsp;[<a href="http://" class="style1">B</a>]&nbsp;[<a href="http://" class="style1">C</a>]&nbsp;[<a href="http://" class="style1">D</a>]</font></div>
<div id="bv_" style="position:absolute;left:196px;top:834px;width:430px ;height:96px;z-index:9" align="left">
<font style="font-size:13px" color="#FF0000" face="Tahoma"><b>INGAT!</font><font style="font-size:13px" color="#000000" face="Tahoma"></b><br>
Jangan sampai TERTIPU oleh yang tidak bertanggung jawab. <br>
</font><font style="font-size:13px" color="#073C70" face="Tahoma"><b>Ber</font><font style="font-size:13px" color="#3F814E" face="Tahoma">Uang</font><font style="font-size:13px" color="#073C70" face="Tahoma">.biz </font><font style="font-size:13px" color="#000000" face="Tahoma"></b>tidak akan meminta uang, seperti biaya untuk pendaftaran, tanda jadi, pajak, dan atau meminjam BPKB, STNK dari Anda.</font><font style="font-size:13px" color="#000000" face="Verdana"><br>
Anda </font><font style="font-size:13px" color="#000000" face="Tahoma">tidak dikenakan BIAYA apapun untuk bergabung dengan Programe ini.</font></div>
<div id="bv_" style="position:absolute;left:0px;top:0px;width:801px;hei ght:28px;z-index:10" align="left">
<img src="bv01043.gif" id="Shape7" align="top" alt="" border="0" width="801" height="28"></div>
<div id="bv_" style="position:absolute;left:197px;top:310px;width:429px ;height:64px;z-index:11" align="center">
<font style="font-size:13px" color="#000000" face="Verdana"><b>Maaf!<br>
Masih Ada Bagian Yang Belum Di-isi. <br>
Silahkan Kembali Dan Mengisi Bagian Yang Bertanda &quot; </font><font style="font-size:13px" color="#8B0000" face="Verdana">*</font><font style="font-size:13px" color="#000000" face="Verdana"> &quot;. <br>
Terima Kasih.</b></font></div>
<div id="bv_" style="position:absolute;left:328px;top:486px;width:169px ;height:25px;z-index:12" align="center">
<button id="AdvancedButton1" type="button" onClick="history.go(-1)" name="Back" value="Back" style="width:169px;height:25px;border:2px #C0C0C0 solid;background-color:#043B73"><p><font style="font-size:13px" color="#FFFFFF" face="Arial"><b>Kembali Ke FORMULIR</b></font></p></button></div>
<div id="bv_" style="position:absolute;left:30px;top:200px;width:764px; height:35px;z-index:13" align="left">
<marquee direction="left" height="35" scrolldelay="90" scrollamount="6" behavior="scroll" loop="0" style="font-family:Tahoma;font-size:24px;font-weight:bold;font-style:italic;text-decoration:none;color:#00008B;background-color:transparent;" id="Marquee1">Drive and Get Paid!</marquee></div>
<textarea name="Error window" id="TextArea3" style="position:absolute;left:200px;top:382px;width:414px ;height:93px;font-family:Verdana;font-size:16px;z-index:14" rows="3" cols="49"><?php echo $error; ?></textarea>
<div id="bv_" style="position:absolute;left:35px;top:479px;width:150px; height:150px;z-index:15" align="left">
<img src="bv01052.gif" id="Shape2" align="top" alt="" border="0" width="150" height="150"></div>
</div>
</body>
</html>


--------------------------------------------------------------------

This is yours when you corrected for me.
<?
session_start();
$error = $_SESSION[error];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>error</TITLE>
<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<STYLE type=text/css>DIV#container {
MARGIN-TOP: 0px; MARGIN-LEFT: auto; WIDTH: 800px; MARGIN-RIGHT: auto; POSITION: relative; TEXT-ALIGN: left
}
BODY {
MARGIN: 0px; TEXT-ALIGN: center
}
</STYLE>
<STYLE type=text/css>A.style1:link {
COLOR: #0000ff
}
A.style1:visited {
COLOR: #800080; TEXT-DECORATION: underline
}
A.style1:active {
COLOR: #ff0000; TEXT-DECORATION: underline
}
A.style1:hover {
COLOR: #0000ff; TEXT-DECORATION: underline
}
</STYLE>
<STYLE type=text/css>IMG {
BEHAVIOR: url("pngfix.***")
}
</STYLE>
</HEAD>
<BODY
style="SCROLLBAR-FACE-COLOR: #c0c0c0; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #808080; SCROLLBAR-3DLIGHT-COLOR: #c0c0c0; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #c0c0c0; SCROLLBAR-DARKSHADOW-COLOR: #000000"
text=#000000 vLink=#0000ff aLink=#073c70 link=#073c70 bgColor=#ffffff>
<DIV id=container>
<DIV id=bv_
style="LEFT: 169px; WIDTH: 143px; POSITION: absolute; TOP: 889px; HEIGHT: 71px"
align=left><IMG id=Shape8 height=71 alt="" src="errorpage_files/bv01036.gif"
width=143 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 1; LEFT: 168px; WIDTH: 144px; POSITION: absolute; TOP: 193px; HEIGHT: 71px"
align=left><IMG id=Shape6 height=71 alt="" src="errorpage_files/bv01024.gif"
width=144 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 2; LEFT: 168px; WIDTH: 504px; POSITION: absolute; TOP: 241px; HEIGHT: 695px"
align=left><IMG id=Shape1 height=695 alt="" src="errorpage_files/bv01011.gif"
width=504 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 3; LEFT: 624px; WIDTH: 145px; POSITION: absolute; TOP: 241px; HEIGHT: 695px"
align=left><IMG id=Shape4 height=695 alt="" src="errorpage_files/bv01045.gif"
width=145 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 4; LEFT: 0px; WIDTH: 47px; POSITION: absolute; TOP: 241px; HEIGHT: 695px"
align=left><IMG id=Shape5 height=695 alt="" src="errorpage_files/bv01023.gif"
width=47 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 5; LEFT: 23px; WIDTH: 167px; POSITION: absolute; TOP: 193px; HEIGHT: 767px"
align=left><IMG id=Shape3 height=767 alt="" src="errorpage_files/bv01013.gif"
width=167 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 6; LEFT: 41px; WIDTH: 134px; POSITION: absolute; TOP: 253px; HEIGHT: 100px"
align=center>
<TABLE id=NavigationBar1 cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=134 height=22><A
href=" id=bv01028 height=22
alt=http://www.beruang.biz/perkenalan.htm
src="errorpage_files/bv01028.gif" width=134 align=top border=0></A></TD></TR>
<TR>
<TD height=4></TD></TR>
<TR>
<TD vAlign=top align=left width=134 height=22><A
href=" id=bv01029 height=22
alt=http://www.beruang.biz/tanyajawab.htm
src="errorpage_files/bv01029.gif" width=134 align=top border=0></A></TD></TR>
<TR>
<TD height=4></TD></TR>
<TR>
<TD vAlign=top align=left width=134 height=22><A
href=" id=bv01030 height=22
alt=http://www.beruang.biz/formulir.htm src="errorpage_files/bv01030.gif"
width=134 align=top border=0></A></TD></TR>
<TR>
<TD height=4></TD></TR>
<TR>
<TD vAlign=top align=left width=134 height=22><A
href=" id=bv01031 height=22
alt=http://www.beruang.biz/hubungikami.htm
src="errorpage_files/bv01031.gif" width=134 align=top
border=0></A></TD></TR></TBODY></TABLE></DIV><IMG id=Image7
style="Z-INDEX: 7; LEFT: 17px; WIDTH: 302px; POSITION: absolute; TOP: 25px; HEIGHT: 173px"
height=173 alt="" src="errorpage_files/bv01040.png" width=302 align=top
border=0>
<DIV id=bv_
style="Z-INDEX: 8; LEFT: 196px; WIDTH: 597px; POSITION: absolute; TOP: 247px; HEIGHT: 20px"
align=left><FONT style="FONT-SIZE: 15px" face=Tahoma color=#000000>[<A
class=style1 href=" class=style1
href=" class=style1 href="
class=style1 href=">
<DIV id=bv_
style="Z-INDEX: 9; LEFT: 196px; WIDTH: 430px; POSITION: absolute; TOP: 834px; HEIGHT: 96px"
align=left><FONT style="FONT-SIZE: 13px" face=Tahoma
color=#ff0000><B>INGAT!</FONT><FONT style="FONT-SIZE: 13px" face=Tahoma
color=#000000></B><BR>Jangan sampai TERTIPU oleh yang tidak bertanggung jawab.
<BR></FONT><FONT style="FONT-SIZE: 13px" face=Tahoma
color=#073c70><B>Ber</FONT><FONT style="FONT-SIZE: 13px" face=Tahoma
color=#3f814e>Uang</FONT><FONT style="FONT-SIZE: 13px" face=Tahoma
color=#073c70>.biz </FONT><FONT style="FONT-SIZE: 13px" face=Tahoma
color=#000000></B>tidak akan meminta uang, seperti biaya untuk pendaftaran,
tanda jadi, pajak, dan atau meminjam BPKB, STNK dari Anda.</FONT><FONT
style="FONT-SIZE: 13px" face=Verdana color=#000000><BR>Anda </FONT><FONT
style="FONT-SIZE: 13px" face=Tahoma color=#000000>tidak dikenakan BIAYA apapun
untuk bergabung dengan Programe ini.</FONT></DIV>
<DIV id=bv_
style="Z-INDEX: 10; LEFT: 0px; WIDTH: 801px; POSITION: absolute; TOP: 0px; HEIGHT: 28px"
align=left><IMG id=Shape7 height=28 alt="" src="errorpage_files/bv01043.gif"
width=801 align=top border=0></DIV>
<DIV id=bv_
style="Z-INDEX: 11; LEFT: 197px; WIDTH: 429px; POSITION: absolute; TOP: 310px; HEIGHT: 64px"
align=center><FONT style="FONT-SIZE: 13px" face=Verdana
color=#000000><B>Maaf!<BR>Masih Ada Bagian Yang Belum Di-isi. <BR>Silahkan
Kembali Dan Mengisi Bagian Yang Bertanda " </FONT><FONT style="FONT-SIZE: 13px"
face=Verdana color=#8b0000>*</FONT><FONT style="FONT-SIZE: 13px" face=Verdana
color=#000000> ". <BR>Terima Kasih.</B></FONT></DIV>
<DIV id=bv_
style="Z-INDEX: 12; LEFT: 328px; WIDTH: 169px; POSITION: absolute; TOP: 486px; HEIGHT: 25px"
align=center><BUTTON id=AdvancedButton1
style="BORDER-RIGHT: #c0c0c0 2px solid; BORDER-TOP: #c0c0c0 2px solid; BORDER-LEFT: #c0c0c0 2px solid; WIDTH: 169px; BORDER-BOTTOM: #c0c0c0 2px solid; HEIGHT: 25px; BACKGROUND-COLOR: #043b73"
onclick=history.go(-1) name=AdvancedButton1>
<P><FONT style="FONT-SIZE: 13px" face=Arial color=#ffffff><B>Kembali Ke
FORMULIR</B></FONT></P></BUTTON></DIV>
<DIV id=bv_
style="Z-INDEX: 13; LEFT: 30px; WIDTH: 764px; POSITION: absolute; TOP: 200px; HEIGHT: 35px"
align=left>
<MARQUEE id=Marquee1
style="FONT-WEIGHT: bold; FONT-SIZE: 24px; COLOR: #00008b; FONT-STYLE: italic; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: transparent; TEXT-DECORATION: none"
scrollDelay=90 loop=0 height=35>Drive and Get Paid!</MARQUEE></DIV><TEXTAREA id=TextArea3 style="Z-INDEX: 14; LEFT: 200px; WIDTH: 414px; COLOR: #000000; FONT-FAMILY: Verdana; POSITION: absolute; TOP: 382px; HEIGHT: 93px" name="Error window" cols=39><?php echo $error;?></TEXTAREA>
</DIV></BODY></HTML>

I don't understand what you said about what editor I use to upload my page. If my editor is messing up my script when I upload the page, why It doesn't mess up yours when I upload yours?
WS

navaldesign
07-04-2007, 09:47 PM
I don't know. As i said, i have fixed it for you so many times. But i can't go on doing this anymore.

WSBlue
07-06-2007, 09:14 AM
I don't know. As i said, i have fixed it for you so many times. But i can't go on doing this anymore.

I am not asking you to fix anything for me.
I just want to know how to do it by myself, in case I want to change ONLY its layout.
I am sorry, you got irritated by my repeating questions.
And I am also frustrated about my stupidity for not being able to figure out by myself.

navaldesign
07-06-2007, 04:24 PM
Philips, as i have said, i do NOT know where you fail or why. Probably it is this line:

$error-$_SESSION[error]; You have "-" instead of "=" .The correct is

$error = $_SESSION[error];

WSBlue
08-27-2007, 02:41 PM
Philips, as i have said, i do NOT know where you fail or why. Probably it is this line:

$error-$_SESSION[error]; You have "-" instead of "=" .The correct is

$error = $_SESSION[error];

Hi! George
and beside above mistake, I finally found out the other mistake that I made at the end of my script.
cols=39>&lt;?php echo $error; ?&gt;</TEXTAREA>

The correct is:
cols=39><?php echo $error;?></TEXTAREA>

Actually, the error page has been working ok for quite sometime but I just found out the exact mistake after I printed them out and go over line by line.
THANK YOU VERY MUCH.