Jump to content

pouncer

Members
  • Posts

    324
  • Joined

  • Last visited

    Never

Everything posted by pouncer

  1. you should try the mail on its own just for that email. [code=php:0] <?php mail("arbourde@chartermi.net", "subject", "message!"); ?> [/code] If that doesn't work, check your servers SMTP configuration.
  2. yeah but those encrypt the string. how can i possibly put an encrypted string as a username or a pass for the mysql_connect string. e.g function myencryptfunctino() { } function mydecryptfunction() { } so what i would do is encrypt my password by doing echo myencryptfunction("whatever"); then id use mydecryptfunction(..whatever it echod above..); like that! but hs anyone got any simple functions like that?
  3. is firefox a downloadable browser? i want to preview my website in firefox. any ideas guys?
  4. isnt there any encrypt() or decrypt() functions so i can do @mysql_connect("localhost", decrypt(hfdhdhgdh), decrypt(hdgdghdghg)) thats what i mean
  5. [code=php:0] function Connect() { @mysql_connect("localhost", "myusername", "password") or die("Could not establish connection to the MySQL server <br /> " . mysql_error()); @mysql_select_db("mydbname") or die("Could not select the database <br />" . mysql_error()); } [/code] how can i encrypt my username and pass, so when i have the file open in dreamweaver no-one can see my real username/pass
  6. i dont think so because the div stuff is html code
  7. im looking for a snippet that will echo Good morning! Good afternoon! Good evening! depending on the time. anyone got any ideas?
  8. [code=php:0]                    <div align="left">                      <p align="center"><span class="style45"><br>                        <span class="style46">Username:<br>                            </span></span>                        <input name="txt_Username" type="text" class="style15" id="txt_Username">                        <br>                        <span class="style47">Password:</span><br>                        <input name="txt_Password" type="password" class="style15" id="txt_Password">                        <br>                        <br>                        <input name="frmLogin_Submit" type="submit" class="style11" id="frmLogin_Submit" value="Login">                        <br>                        <span class="style47"><a href="forgot_password.php" style="color:#ffffff">Forgot your password? </a></span></p>                      </div> [/code] basically i want to disable all of that div section, but unsure how? if ($log->IsLoggedIn() == true) { //disable that div section } else { //whatever.. } anyway got any ideas?
  9. ahh, I see now. Thanks. another question while we are here buddy. echo "Welcome back $log->GetUserName()"; when i do echo $log->GetUserName(); then it echos John but how do i get the first one working?
  10. take for e.g [code=php:0] class Test { function Hello() { echo "hi"; } function Bye() { echo "Bye"; } function Hmm() { //how do i call Hello() here? } } [/code]
  11. is it possible the format of my code? [code=php:0] $Subject = "Your membership!"; $Message = "Dear $Username, Thank you for registering at our website. You are two steps away from logging in and accessing our exclusive members area. To activate your membership, etc etc........ [/code] and when i receive it its like Dear username, <loads of space here> Thank you .......... <loads of space here> next text.... where it should be like Dear username, blah blah.. blah blah... any ideas why this is happening? Thank you
  12. Thanks for the info. Much appreciated.
  13. [code=php:0] session_register('UserID'); session_register('Username'); session_register('Email'); session_register('User_Level'); $_SESSION['UserID'] = $row['userid']; $_SESSION['Username'] = $Username; $_SESSION['Email'] = $row['email_address']; $_SESSION['User_Level'] = $row['user_level']; [/code] I'm not sure if I need the session_register stuff? Also, as soon as the session variables are set after a user logs in successfully, will these variables be for all pages? so at the top of every php page do i simply put session_start(); one of my pages is member.php - i need to check if the member is logged in, for this page to be viewable by a member. how could i do this? is this a correct way? [code=php:0] if isset($_SESSION['Username']) && ($_SESSION['UserID'] == 0) echo "Logged in as member"; else { echo "You are not logged in"; //redirect back to index.html } [/code] for the admin.php the userid must be 1. similar type of code here? am i in the right direction guys?
  14. yeah mate, that makes more sense to me. thanks alot for clearing that up. but in your first example: [code] $page = $_GET['page']; if($page == "aboutUs")   {     //echo the html for the aboutUs page here   } elseif($page == "contactUs")   {     //echo the html for the contactUs page here   } [/code] you say 'echo the html for the whatever page here doesn't that mean i still need to have seperate pages on the webserver anyway?
  15. i know that by doing $_GET['page'] but he has like 12 pages within his index.php im just curious how can i do this in dreamweaver, how do i split the pages up otherwise my index.php will be a massive piece of code
  16. I'm using dreamweaver to design my site. I came across this site http://www.evo7ution.com/dentaltrust/ whatever link we click on, the link is like http://www.evo7ution.com/dentaltrust/index.php?page=11 all the pages are part of the index.php how has this been done? i think this is more effecient than having loads of different pages anyone got any ideas?
  17. [quote author=alpine link=topic=114199.msg464554#msg464554 date=1162939186] You must escape double quotes within a string that's started and ended with double quotes: \"index.html\" + EDIT: You can use meta refresh to redirect [code] <?php function RedirectBackToLogin() { echo "<meta http-equiv=\"refresh\" content=\"5; url=index.html\" />"; echo "<br>You will be redirect back to the main login page in 5 seconds, or click <a href=\"index.html\">here</a> to go back.<br>"; } ?> [/code] [/quote] Thanks Alpine, perfect. Only problem is when the word 'here' gets hyperlinked my page backgrounds are all dark colors so i can't see the word clearly. is there a way to set the hyperlink color to white or something?
  18. [code=php:0] function RedirectBackToLogin() { echo "<br>You will be redirect back to the main login page in 5 seconds, or click <a href="index.html">here</a> to go back.<br>"; } [/code] keeps giving me error Parse error: parse error, unexpected T_STRING, expecting ',' or ';' and can someone show me how to make it go back to index.html after 5 seconds?
  19. Thanks. but what if that username or password do not exist in the database?
  20. [code=php:0] $Password = md5($Password); mysql_query("SELECT * FROM users WHERE username='$Username' AND password='$Password'"); $login_check = mysql_num_rows($sql); if ($login_check > 0) { //check if activated. } [/code] i need to check if the 'Activated' field of the user is 1. i.e, if the user who is logging in has actually activated their memberhsip. how do i do this?
×
×
  • 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.