Jump to content

Hepp

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Hepp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ken, I LOVE YOU. THANK YOU. So simple, yet I need sleep. Thanks buddy. Revised correct code for anyone who is looking: <?php function aboutUs() { echo "This is the <b>about</b> section.<p>"; } function otherPage() { echo "This is the <b>other</b> section.<p>"; } if (isset($_GET['page'])) { $page = ($_GET['page']); if ($page == "aboutUs") { aboutUs(); } elseif ($page == "otherPage") { otherPage(); } else { echo ""; } } ?> <a href=static.php?page=aboutUs>About</a> <a href=static.php?page=otherPage>Other</a> Thanks again Ken =) -Hepp
  2. The problem is that when you click the link, it does not display the code from the function like I've been trying to get it to, you know? But the function calling the variable, I removed it. I tried something earlier, forgot to get rid of it. Here's the revised code: <?php function aboutUs() { echo "This is the <b>about</b> section."; } if (isset($_GET['page'])) { $page = ($_GET['page']); if ($page[0] == "aboutUs") { aboutUs(); } else { echo ""; } } ?> <a href=static.php?page=aboutUs>About</a> Can you not refer to $page as a single and then to an array? I couldn't think of another way to do this. Thanks man. -Hepp
  3. Hepp

    Help?

    You set your index page to tos.php in your server settings, or place the tos code in the index page, and make a home.html page and link after they agree to them at the bottom. Simple.
  4. Hey man, thanks for replying. I quickly threw it in the title - apologies. I'm trying to have a page, and when the link is clicked (bottom of code), it pulls out the function using $_GET because I'm looking to make many of these. And the problem is that the text doesn't appear from the function when the link is clicked. Thanks. -Hepp
  5. To answer your question, yes I read the FAQs, and there was a Select Case example there. I've been coding for 3+ years now, but this is angering me. Snippet of code: <?php function aboutUs($page) { echo "This is the <b>about</b> section."; } if (isset($_GET['page'])) { $page = ($_GET['page']); if ($page[0] == "aboutUs") { aboutUs(); } else { echo ""; } } ?> <a href=static.php?page=aboutUs>About</a> I've been trying to get that to work all day. Is there something I am overlooking, doing wrong, or forgetting? Bleh I need sleep Thanks so much. -Hepp
  6. Thank you for your reply. Your solution unfortunately did not work, and gave me the same error :-\ Thank you for the help though. Any other suggestions? Anyone? ???
  7. Thank you for your help again. I don't quite understand what your saying, but I need to use the email the user supplies in the input field in order for them to receive the mail and not the one in php.ini. Like: They enter their email, click "Retrieve Password", the PHP code matches their email with the one in the database and grabs their password, puts the correct password in the message, then sends the email to that users email, along with their password. I need this. Anymore suggestions?
  8. Progress... thank you for your reply mmarif4u. I set the header email to the one in php.ini... Now I only get this error message: Warning: mail() [function.mail]: SMTP server response: 550 Account is not local, relaying disallowed. Any more ideas? Anyone?
  9. I have two different servers, a web and a mail server. The mail server uses localhost and the port of 25 for SMTP in php.ini, and the "sendmail_from" is set in php.ini - I'm 100% sure. I tried making a simple mail script work... <?php // The message $message = "Line 1\nLine 2\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('BlahBlah@gmail.com', 'My Subject', $message); ?> I have the php.ini "sendmail_from" setting to a different email than in that code. I need the code to have different emails for such things as a forgot password script when parsing info over $_POST, like the email. I need it to send the info to their email, not the one in php.ini. Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in *FilePath* on line *SomeNumber* And it's given me a headache to the max. And now I'm angry at this thing. GAH! ??? Any suggestions? Thanks for the help if so
  10. [url=http://www.propergrammar.com/]This Will Help You With All Your Needs.[/url]
  11. I no understand your speak.
  12. Try putting the connection to the database and whatnot in its own file, like config.php, and then include it in submit.php.
  13. The bottom of your coding isn't correct: Change: [code] else echo "not added"; { [/code] To: [code] else { echo "not added"; } [/code]
  14. You could search for a PHP Job Script at this link: http://www.hotscripts.com
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.