Help with a line of script
Date: 05/26/06
(WebDesign) Keywords: web
I know my way around scripting only enough to tweak already-made scripts to my needs, and only some basic tweaks.
I'm currently working with a pre-written form mailer that uses the following line to trigger a user error message:
$error_required = "[p]You did not fill some of the required fields in properly. Please go back, refresh the form page, and try again.[/p]";
(carrats replaced with brackets because the "code" tag isn't working... not sure how to do that)
Because of the ridiculous way the website was written by another firm (it uses three different includes interspersed with partial table tags to make the menus), I need to point the error to a new page in order for me to be able to format it correctly.
Can someone help me with the language I could use to turn that $error_required line into a link to a new page instead of just text?
Thanks!
ETA:
Here's the rest of the code, if something needs to be changed here instead:
for($checkreq = 0; $checkreq < count($req); $checkreq++) {
if (empty($_POST[$req[$checkreq]])) {
if ($use_headers == 0){
echo $header_file;
}
else {
include($header_file);
}
echo "[h2]Error[/h2]" . $error_required;
if ($use_footers == 0) {
echo $footer_file;
}
else {
include ($footer_file);
}
exit;
} //endif
} //endfor
Source: http://community.livejournal.com/webdesign/1115215.html