Help with code

  • Thread starter Thread starter Sheetrum
  • Start date Start date
S

Sheetrum

I've been having a problem with some PHP code. Is there anyone in here to
help or know where to look for help? Everywhere I look for help, I've been
getting none. I'm pretty sure it's only one or two lines of code giving me
my headaches!

I've always been able to get help in here before.

The code is under "PHP Help" a few threads down.
 
what is the failure/ error message?

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
 
With the wrong code, the page comes up blank. And that is with only
changing one line of code, the 7th line with, what I thought would be a
link. The page is: http://www.sacredheartlanc.org/school/form.php

The code for the entire page is:
<?php
session_start();

if( isset($_POST['submit'])) {
if( $_SESSION['security_code'] == $_POST['security_code'] &&
!empty($_SESSION['security_code'] ) ) {
// Insert you code for processing the form here, e.g emailing the
submission, entering it into a database.
link(string $target, www.sacredheartlanc.org/school/menu.htm $link)
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
echo 'Please enter the Security Code correctly!';
}
} else {
?>

<form action="form.php" method="post">
<p align="center"><br />
<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5"
/><br>
<br />
<label for="security_code">Security Code: </label><input
id="security_code" name="security_code" type="text" /><br>
<br />
<input type="submit" name="submit" value="Submit" />
</p>
</form>

<?php
}
?>
 
remove the www.... address from that line and see what happens.
I wonder if the / characters in that are causing the problem, or is it
should have a "," after the URL, or if you're supposed to define your link
elsewhere since it's got a $link just after the address you added.

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
Sheetrum said:
With the wrong code, the page comes up blank. And that is with only
changing one line of code, the 7th line with, what I thought would be a
link. The page is: http://www.sacredheartlanc.org/school/form.php

The code for the entire page is:
<?php
session_start();

if( isset($_POST['submit'])) {
if( $_SESSION['security_code'] == $_POST['security_code'] &&
!empty($_SESSION['security_code'] ) ) {
// Insert you code for processing the form here, e.g emailing the
submission, entering it into a database.
link(string $target, www.sacredheartlanc.org/school/menu.htm $link)
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
echo 'Please enter the Security Code correctly!';
}
} else {
?>

<form action="form.php" method="post">
<p align="center"><br />
<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5"
/><br>
<br />
<label for="security_code">Security Code: </label><input
id="security_code" name="security_code" type="text" /><br>
<br />
<input type="submit" name="submit" value="Submit" />
</p>
</form>

<?php
}
?>
Chris Leeds said:
what is the failure/ error message?

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to
email addresses in public newsgroups.
Sorry for any inconvenience.
 
I tried your suggestions, but nothing did the trick. Sometimes I only get a
blank page if the code isn't right, other times when I do see the page, the
form doesn't work like I need it to.


Chris Leeds said:
remove the www.... address from that line and see what happens.
I wonder if the / characters in that are causing the problem, or is it
should have a "," after the URL, or if you're supposed to define your link
elsewhere since it's got a $link just after the address you added.

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
Sheetrum said:
With the wrong code, the page comes up blank. And that is with only
changing one line of code, the 7th line with, what I thought would be a
link. The page is: http://www.sacredheartlanc.org/school/form.php

The code for the entire page is:
<?php
session_start();

if( isset($_POST['submit'])) {
if( $_SESSION['security_code'] == $_POST['security_code'] &&
!empty($_SESSION['security_code'] ) ) {
// Insert you code for processing the form here, e.g emailing the
submission, entering it into a database.
link(string $target, www.sacredheartlanc.org/school/menu.htm $link)
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
echo 'Please enter the Security Code correctly!';
}
} else {
?>

<form action="form.php" method="post">
<p align="center"><br />
<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5"
/><br>
<br />
<label for="security_code">Security Code: </label><input
id="security_code" name="security_code" type="text" /><br>
<br />
<input type="submit" name="submit" value="Submit" />
</p>
</form>

<?php
}
?>
Chris Leeds said:
what is the failure/ error message?

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to
email addresses in public newsgroups.
Sorry for any inconvenience.
I've been having a problem with some PHP code. Is there anyone in here
to help or know where to look for help? Everywhere I look for help,
I've been getting none. I'm pretty sure it's only one or two lines of
code giving me my headaches!

I've always been able to get help in here before.

The code is under "PHP Help" a few threads down.
 
Back
Top