Jump to content

JeanieTallis

Members
  • Posts

    123
  • Joined

  • Last visited

    Never

Everything posted by JeanieTallis

  1. <?php if (mysql_num_rows($results) > 0) { include_once('tab.php'); } else { echo 'no tabs!'; } ?> (summerize of the two pieces of code given to make it easier)
  2. It is like a search bar? You type in lets say the song or band name click submit, and it comes up with the word 'Tab' ?
  3. From what I see if ($results) { What results? eg: with a login, it would be if ($results -> logged_in) { page to display to logged in users } else { page to display to none logged in users } So the problem I'm guessing would be, the 'form' as I'm guessing it could be, doesnt know what the results have to be to display tab.php How do you get this 'tab' to come up? is it via the form with a button or... give me details on what you to.
  4. It all depends how your inserting the values into the database. Button, Page Refresh Form (linking to a button I guess) Also, I do advise you to not put real database passwords and usernames. Also, I don't see your database name?
  5. For the add; how do I set my topics as solved? Thanks
  6. I found the problem, like thebadbad said, needed a close bracket, though, this had to be placed <?php } <---- HERE include("../include/view_active_admin.php"); ?> [code] Thanks guys for telling me what I needed!
  7. I have checked the include file, and i copied the code what is to display what I wanted. This works, so it is the in user_online.php file, nothing wrong with the include file.
  8. How would I check it for an error, it doesn't seem to be giving me one.
  9. The only include file which would have the error, the rest work like a charm, the only one that wouldnt work is the following code <?php echo "<table align=\"left\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n"; echo "<tr><td><font size=\"2\">\n"; for($i=0; $i<$num_rows; $i++){ $uname = mysql_result($result,$i,"username"); echo "<a href=\"userinfo.php?user=$uname\">$uname</a> / "; } echo "</font></td></tr></table><br>\n"; ?>
  10. Sorry, some people prefer it without them as its easier to read for them. I included that bracket too, same error still shows.
  11. I recieve this error on http://www.myvee.co.uk/admin/user_online.php parse error: syntax error, unexpected $end in /home/myveeco/public_html/admin/users_online.php on line 64 However, I don't have a line 64. Help me out with it. Here is the code for Users_Online.php <? include("../include/session.php"); if(!$session->isAdmin()){ header("Location: ../index.php"); } else{ ?> <title>MyVee! User Online</title> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <link href="../Style4.css" rel="stylesheet" type="text/css"> <div id="wrapper"> <div id="Layer4"> <div style="color:WHITE;"> <script type="text/javascript"> var d=new Date() var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") document.write(weekday[d.getDay()] + " ") document.write(d.getDate() + ". ") document.write(monthname[d.getMonth()] + " ") document.write(d.getFullYear()) </script> </div></div> <div id="Layer2"></div> <div id="Layer1"></div> <div id="Layer3"> <p>[ <a href="http://www.myvee.co.uk">Back</a> ]<br> <p> <? include("../include/view_active_admin.php"); ?> </html> </div> </div> Whats causing the error and where should it go. Thanks
  12. Got it sorted, forgot to include session.php! Cant believe I missed that out! Thanks for assisting me with the other errors. Works like a charm.
  13. Basically, what I was trying to get at, but you said it in more complicated terms. A Valid Login = Page to display to the user A Invalid Login = Error I think thats what you were getting at anyway lonewolf217.
  14. Is there a specific page afte rbeing logged in users should go to?
  15. Is the error message "Error Invalid username or password" Also, Though, in the login.php file, shouldn't it call the functions.php file? ***EDIT*** If the error message is what I asked, then you wont need to call the functions.php file, yet if ($row == 1){ $_SESSION['user'] = $user; }else{ I believe should know what to do, I'm guessing it doesn't recognise what it is that it has to do. So it gives the error maybe?
  16. http://www.evolt.org/article/PHP_Login_System_with_Admin_Features/17/60384/index.html At the bottom of the article (not at the bottom of the page as theres comments) theres a download to use. Sorry about putting it in the wrong place, people reply here.. so I'd get a better response.
  17. By what I'm guessing, You click the pdf link, and it then opens up a dialog box with one button saying 'save as' ? I don't understand what it is you are trying to do what the 'user' clicks the link for download.
  18. I am unable to actually locate what you wanted, this is the whole code to the index page (with the error) <title>MyVee!</title> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <link href="Style.css" rel="stylesheet" type="text/css"> <div id="wrapper"> <div id="Layer4"> <div style="color:WHITE;"> <script type="text/javascript"> var d=new Date() var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") document.write(weekday[d.getDay()] + " ") document.write(d.getDate() + ". ") document.write(monthname[d.getMonth()] + " ") document.write(d.getFullYear()) </script> </div></div> <div id="Layer2"> <div id="Layer5"> <table width="325"> <tr> <td><? /** * User has already logged in, so display relevant links, including * a link to the admin center if the user is an administrator. */ if($session->logged_in){ echo "<h1>Logged In</h1>"; echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " ."[<a href=\"useredit.php\">Edit Account</a>] "; if($session->isAdmin()){ echo "[<a href=\"admin/admin.php\">Admin Center</a>] "; } echo "[<a href=\"process.php\">Logout</a>]"; } else{ ?><br /> <? /** * User not logged in, display the login form. * If user has already tried to login, but errors were * found, display the total number of errors. * If errors occurred, they will be displayed. */ if($form->num_errors > 0){ echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>"; } ?> <form action="process.php" method="post"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr> <td>Username:</td> <td><input name="user" type="text" value="<? echo $form->value("user"); ?>" size="34" maxlength="40" /></td> <td><? echo $form->error("user"); ?></td> </tr> <tr> <td>Password:</td> <td><input name="pass" type="password" value="<? echo $form->value("pass"); ?>" size="34" maxlength="40" /></td> <td><? echo $form->error("pass"); ?></td> </tr> <tr> <td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?> /> Remember me <input type="hidden" name="sublogin" value="1" /> <input name="submit" type="submit" value="Login" /></td> </tr> <tr> <td colspan="2" align="left"><br /> <font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td> <td align="right"></td> </tr> <tr> <td colspan="2" align="left"><br /> Not registered to MyVee? <a href="register.php">Sign-Up!</a></td> </tr> </table> </form> <? } /** * Just a little page footer, tells how many registered members * there are, how many users currently logged in and viewing site, * and how many guests viewing site. Active users are displayed, * with link to their user information. */ echo "</td></tr><tr><td align=\"center\"><br><br>"; echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>"; echo "There are $database->num_active_users registered members and "; echo "$database->num_active_guests guests viewing the site.<br><br>"; include("include/view_active.php"); ?> </td> </tr> </table> </div> </div> <div id="Layer1"></div> <div id="Layer3"> <p>MyVee is a brand new networking community website. This service works like any other, why don't you give us a go? You may use this website to contact your friends, or even meet new people. As many of you have heard of Bebo & Myspace & Facebook, you will enjoy this too. Works in exactly the same way. You have your very own unique profile, where people can search for you and take an interest in your page.</p> <p>Access on this page is limitted as you are not logged in, you must register if you haven't already do so and then login.</p> </div> </div> Maybe you are able to tell me where I should find what your after. Thanks for helping me.
  19. Okay, sorted that problem, so now if you aint the admin, you get directed back to index.php. The error on line 84 ain't showing up, is this because I sorted the session.php. The other error, which I pointed out, was at line 54 on the index.php (first page) Which is also stated as my first error.
  20. i tried include/session.php :/ i tried alsorts. I just dont get the problem I actually tried now /include/session.php Only come up with two errors. Warning: include() [function.include]: Failed opening '/include/session.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myveeco/public_html/Admin/admin.php on line 14 Fatal error: Call to a member function isAdmin() on a non-object in /home/myveeco/public_html/Admin/admin.php on line 84
  21. I have one error which can be seen on http://www.myvee.co.uk Error is Fatal error: Call to a member function value() on a non-object in /home/myveeco/public_html/index.php on line 54 Line 54 is as follows <td><input name="user" type="text" value="<? echo $form->value("user"); ?>" size="34" maxlength="40" /></td> Errors within the admin section Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/myveeco/public_html/Admin/admin.php on line 14 Warning: include(http://www.myvee.co.uk/include/session.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/myveeco/public_html/Admin/admin.php on line 14 Warning: include() [function.include]: Failed opening 'http://www.myvee.co.uk/include/session.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myveeco/public_html/Admin/admin.php on line 14 Fatal error: Call to a member function isAdmin() on a non-object in /home/myveeco/public_html/Admin/admin.php on line 84 Line 14 is as follows include("http://www.myvee.co.uk/include/session.php"); (I have tried include/session.php however, errors did occur then too. session.php is in the includes directory, admin is in the Admin directory) Line 84 is as follos if(!$session->isAdmin()){ header("Location: index.php"); } (Top line is 84, but I put in the whole code snippet) More errors may exist, these are all I've come across, I cant do anything without these done. Thanks.
  22. Anyone got any links going to a secure login form that actually works with no problems what so ever. I have been through loads, and all of them have had problems, either with staying logged in, just completely messed up in total, even if you use the install.php and install it! All messed up. Thanks! (Ideally would be tested by you so you know it works too)
  23. Okay, I moved it up. The error disappears, but yet again, the form only refreshes, does not go into the database or send a confirmation email. It's really confusing me.
  24. error_reporting(E_ALL); $ifError = false; session_start(); include('db.php'); if (isset($_POST['submit'])) { if ( !$_POST['full_name'] || !$_POST['email'] || !$_POST['username'] || !$_POST['password'] || !$_POST['password'] == !$_POST['password_confirmed'] || !$_POST['country'] || !$_POST['user_code']) { $error = 'You did not fill in a required field!'; $ifError = true; } if (strcmp(md5($_POST['user_code']),$_SESSION['ckey'])) { $error = 'Invalid code entered. Please enter the correct code as shown in the Image!'; $ifError = true; } if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); } $qry = "SELECT username FROM users WHERE username = '".$_POST['username']."'"; $sqlmembers = mysql_query($qry) or die(mysql_error()); $name_check = mysql_fetch_array ($sqlmembers); $name_checkk = mysql_num_rows ($sqlmembers); if ($name_checkk != 0) { $error ='Sorry, the username: <strong>'.$_POST['username'].'</strong>' . ' is already taken, please pick another one. Click back.'; } if (!preg_match("/.*@.*..*/", $_POST['email']) || preg_match("/(<|>)/", $_POST['email'])) { $error = 'Invalid e-mail address.'; $ifError = true; } if ($_POST['password'] != $_POST['password_confirmation']) { $error = 'Passwords did not match.'; $ifError = true; } if(!$ifError) { $_POST['username'] = strip_tags($_POST['username']); $_POST['password'] = strip_tags($_POST['password']); $_POST['country'] = strip_tags($_POST['country']); if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); $_POST['password'] = addslashes($_POST['password']); $_POST['email'] = addslashes($_POST['email']); $_POST['country'] = addslashes($_POST['country']); } $date_registered = date('m d, Y'); $md5pass = md5($_POST['password_confirmation']); $activ_code = rand(1000,9999); mysql_query("INSERT INTO users (`username`,`email`,`password`,`country`,`date_registered`,`activation_code`,`full_name`) VALUES ('$_POST[username]','$_POST[email]','$md5pass','$_POST[country]','$date_registered','$activ_code','$_POST[full_name]')") or die(mysql_error()); $message = "Dear $_POST[full_name] \n Thank you for registering an account with MyVee. Here are the login details...\n\n Username: $_POST[username] \n User Email: $_POST[email] \n Password: $_POST[password_confirmation] \n Activation Code: $activ_code \n ____________________________________________ *** ACTIVATION LINK ***** \n Activation Link: http://jeanies-poetry.com/activate.php?usr=$_POST[email]&code=$activ_code \n\n _____________________________________________ Thank you. This is an automated response. PLEASE DO NOT REPLY. "; mail($_POST['email'] , "Account Activation", $message, "From: \"Auto-Response\" <notifications@myvee.co.uk>\r\n" . "X-Mailer: PHP/" . phpversion()); unset($_SESSION['ckey']); echo("Registration Successful! An activation code has been sent to your email address with an activation link..."); exit; } } else { echo $error; } Have I missed anything out? The same error comes up on the page. "Notice: Undefined variable: error in /home/myveeco/public_html/register.php on line 85" also nothing happens still. Just refreshes the page.
×
×
  • 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.