Jump to content
Sign in to follow this  
Guest Foolygoofy26

If statement help

Recommended Posts

Guest Foolygoofy26

Can anybody tell me what is wrong here. I have a form on the previous page that has a textbox called "code". I'm trying to get the value on this page from the previous page, compare values and is values is on an if, display a link, else, display a messageThis is the code I wrote, but it's giving me an error, anybody sees something wrong here<?php if ($_POST["code"] == "list")echo "<a href=Downloads/list.txt target=top>See List</a>";elseecho "Access Denied"; ?>

Share this post


Link to post
Share on other sites
<?phpif ($_POST['code'] == "list") {echo "<a href=\"Downloads/list.txt\" target=\"top\">See List</a>";}else {echo "Access Denied";};?>

give that a whirl

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...