Jump to content

tkolbeck

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tkolbeck's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Does anybody know of a FREE PHP auction class???? I have been looking forever and cant find a thing ???
  2. I think what I would need is something like a header.php file that shows the users status (loggod on or not)?
  3. I have a members system on my site and I have a logon on my index page and when a user logons on it redirects the user to another page saying that they are loggod on. I need the index page to say that they are logged on on the index page. I dont know much about php but i think what I am trying to say is I need the session to also be on teh index page alos what do I do?? Sorry If doesnt make anysense at all :-\ Thanks, Tylor
  4. Now I am getting this error: Parse error: parse error, unexpected $ in /home/www/bbbshops.com/login_success.php on line 28 when there is nothing on line 28 Here is my code <?php session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } if(session_is_registered(myusername)){ echo "Hello, ".$_SESSION['myusername']." "; } else { echo "Hello Guest" ?> <html> <body> Login Successful </body> </html>
  5. I got it! thanks sorry again but could you tell me how to make it so it says hello, guest if there is no session? thanks
  6. I still get "Hello, Login Successful"
  7. Here is the code that I am using: <? session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } echo "Hello, $username"; ?> <html> <body> Login Successful </body> </html> and it doesnt show that it outputs "Hello,Login Successfull"
  8. yes I have started a session
  9. i am sorry but you are going to have to bare with me because I am a beginner and learning. How do I know if $username is set i nteh session or what should it look like?
  10. I need a code that prints "Hello, $username" code can anybody help me by wrighting this out for me? I have the variable $username for the username. Thanks, Tylor
  11. does anybody know of a good simple member system that i could use that you know works?? ???
  12. could someone make the code that I need in sql to just insert into mysql database so it makes the tables automatically; that i need. I hope that makes sense? :-\
  13. I am trying to set a member system and I have to run the install of the script to set up the database automatically and I keep getting this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/bbbshops.com/install.php on line 120 can someone help me with the code or just wright up the code to just insert it into mysql databse to create it because I am a beginner with this stuff. Here is my code:(uzzisofts code) <?php /****************************************************************************** * Install Script * ------------------------------ * Filename: install.php * Project: Uzzisoft - PHP Simple Member System * By: Alejandro(Alex) Iannuzzi * Company: Uzzi Soft * Copyright: © 2004 Uzzi Soft - Alejandro(Alex) Iannuzzi * Website: http://www.uzzisoft.cjb.net * Email: alexiannuzzi02@hotmail.com * License: Freeware * Version: 1.0.2.1 * Build Date: 2004-05-10 * * If you find bugs/errors/anything else you would like to point to out * to us please feel free to contact us. * * What it does: * Creates a new database and two new tables for this project * * How it does it: * Gets the values from the form. Checks if they are empty. Connects * to the MySQL server using the values from the form. * Creates the phpsms database. Creates the tables userdata and usersonline. * Checks to see if they have rows and if they do print installation * complete else print that there was a error. * *****************************************************************************/ ?> <html> <head> <title>Installation of Uzzi Soft - PHP Simple Member System</title> </head> <body> <center> <font face="Verdana" size="3"><B> Uzzi Soft - PHP Simple Member System Installation </B> </font> <BR><BR> <font face="Verdana" size="2"> We will be installing the PHP Simple Member System into your MySQL Server<BR> Please enter the details of your MySQL Server below.<BR> If you MySQL is located on this computer enter "localhost" without the quotes<BR> in the IP Address of MySQL Server.<BR><BR> This script will create a new database called phpsms and two tables which are<BR> userdata and usersonline<BR><BR><BR> </font> </center> <form action="install.php" method="POST"> <table border="0" width="455" id="table1"> <tr> <td width="273" height="24"><font face="Verdana">IP Address of MySQL Server:</font></td> <td height="24"> <input type="text" name="ipaddressofmysqlserver"/></td> </tr> <tr> <td width="273" height="24"><font face="Verdana">MySQL Username:</font></td> <td height="24"> <input type="text" name="mysqlusername" /></td> </tr> <tr> <td width="273"><font face="Verdana">MySQL Password:</font></td> <td> <input type="password" name="mysqlpassword" /></td> </tr> <tr> <td width="273" height="68"> </td> <td height="68"> <input type="submit" value="Install"> <input type="reset" value="Clear"></td> </tr> </table> </form> <BR><BR> <?php // Begin Installatin of PHP Simple Member System // Variables that data come from the submission form $ipmysql = $_POST["ipaddressofmysqlserver"]; // Ip Address of MySQL Server $mysqlusername = $_POST["mysqlusername"]; // Username of the MySQL Server $mysqlpassword = $_POST["mysqlpassword"]; // Password of the MySQL Server // Check if all the fields are filled in if ((!$ipmysql) || (!$mysqlusername) || (!$mysqlpassword)) { if (!$ipmysql) { echo "Please enter the IP Address of the MySQL Server<BR>"; } if (!$mysqlusername) { echo "Please enter the username of the MySQL Server<BR>"; } if (!$mysqlpassword) { echo "Please enter the password of the MySQL Server<BR>"; } exit(); // If there are errors then we quit this script } // Connect to the MySQL server $link = mysql_connect("$ipmysql", "$mysqlusername", "$mysqlpassword"); // Create a new database mysql_query('CREATE DATABASE phpsms'); // Select the new database mysql_query('USE phpsms'); // Create new userdata table mysql_query('CREATE TABLE userdata (userid VARCHAR(100), userpass VARCHAR(100), name VARCHAR(70), address VARCHAR(50), suburb VARCHAR(50), state VARCHAR(50), postcode VARCHAR(6), phone1 VARCHAR(11), phone2 VARCHAR(11), emailaddress VARCHAR(90), joineddate VARCHAR(19), ip VARCHAR(16), userno INT(11), username VARCHAR(20))'); // Create new usersonline table mysql_query('CREATE TABLE usersonline (username VARCHAR(20))'); // Check is there is both tables and then installation is completed $tablecheckuserdata = mysql_query('SELECT * FROM userdata'); $tablecheckuserdata1 = mysql_num_rows($tablecheckuserdata); $tablecheckusersonline = mysql_query('SELECT * FROM usersonline'); $tablecheckusersonline1 = mysql_num_rows($tablecheckusersonline); if ($tablecheckuserdata1 >= 0 && $tablecheckusersonline >= 0) { echo "Installation Complete!"; mysql_close(); // Close the connection to the MySQL Server } else { echo "A error occured, try again"; exit(); } ?> </body> </html>
×
×
  • 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.