Jump to content

Lamez

Members
  • Posts

    1,686
  • Joined

  • Last visited

    Never

Everything posted by Lamez

  1. I guess I should have told you guys that. Well anything doing with the database is having trouble. For example, registration will not work. Logins do not work. I am so lost on this.
  2. what do you mean? I need help, and the only way I know how to let you help me, is allowing peeps to view the scripts
  3. I have been working on this site for months, and I cannot figure out what is wrong, please help me guys you can download all the files in this zip file: http://uploads.lamezz.com/lamez.zip you can view the files in action here: http://lamezz.com/new/ please let me know what I am doing wrong. I did not make the login script, but I did however rearrange some files, and modified some as well. -Thanks very much! ???
  4. also http://www.servage.net is a great web host use lamez as your coupon code, and get 30gb more.
  5. ya, see after I posted this, I looked again, and it does lack color. I will work on the colors later, I am working on the scripts right now. *what a run on sentence, oh well. thanks guys
  6. I love the design! nice job.
  7. I know it is just a coming soon page, but what do you guys think, I know you guys are going to say it lacks color, but I like the colors, I am talking about the over all layout. http://lamezz.com/new/index.php thanks
  8. ok how would I take the information from a form and add it to a database, would I some way make the form fields variables, then take the variables and plug them in..?
  9. ok In my installation process, I wanted the user to be able to add their own username and password with admin rights. I have a form that will allow them to do this, but I cannot get it to take the information from the form and add it to the database. How can I do this? here is my form script <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <h1>Creating Admin Account (Step 3 of 3)</h1> <p>this will create your user name and password to the website's database, this will able you to run the website, just login as this username, and password </p> <form id="form1" name="form1" method="post" action="action.php"> <table width="75%" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="23%">Administration's User Name </td> <td width="22%"><input name="username" type="text" id="username" size="30" maxlength="50" /></td> <td width="55%"> </td> </tr> <tr> <td>Administration's Password </td> <td><input name="password" type="password" id="password" size="30" maxlength="50" /></td> <td> </td> </tr> <tr> <td>Administration's E-Mail </td> <td><input name="email" type="text" id="email" size="30" maxlength="50" /></td> <td> </td> </tr> <tr> <td><input name="userid" type="hidden" id="userid" value="1" /> <input name="userlevel" type="hidden" id="userlevel" value="1" /></td> <td><input type="submit" name="Submit" value="Finish" /> <input name="reset" type="reset" id="reset" value="Reset" /></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </form> <p> </p> </body> </html> here is my action.php, it is suppose to add info to the database <?php if(isset($_POST['submit'])) include ("../_bin_/config.php"); {//begin of if($submit). // Set global variables to easier names // and pervent sql injection and apostrophe to break the db. $user = mysql_escape_string($_POST['username']); $pass = mysql_escape_string($_POST['password']); $ulvl = mysql_escape_string($_POST['userlevel']); $uid = mysql_escape_string($_POST['userid']); $emil = mysql_escape_string($_POST['email']); include ("../_bin_/config.php"); // connect to the mysql server $link = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($DB_NAME) or die ("Could not select database because ".mysql_error()); //run the query which adds the data gathered from the form into the database $result = mysql_query("INSERT INTO users (username, password, userlevel, userid, email"); //print success message. echo "<meta http-equiv=Refresh content=1;url=finish.php>"; } ?> any suggestions? I need to add this info to the database "websitedb" under the table "users" Username, Password, Email, UserID, Userlevel. How?
  10. man I feel dumb, always relying on others to debug my code for me. Sorry about that!
  11. ok it gets all the way the the active user's table, then it says it already exists and will not add the other tables it only adds the user table, and the active user's table. How can I fix this -Thanks
  12. so instead of doing it in whole query I have to make 4 separate ones? ex: mysql_query($user) mysql_query($auser) mysql_query($guest) mysql_query($ban) or die ("Could not create tables because ".mysql_error()); echo "Tables have been installed."; echo "<a href=install_3.php>Click here to continue</a>"
  13. I am trying to add tables to my database, but I get this error here is line 54 mysql_query($user, $auser, $guest, $ban) here is the whole script <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Database Installer</title> </head> <body> <h1>Adding Tables to Database (Step 2 of 3)</h1> <p>This will add the tables needed to the database </p> <p> </p> </body> </html> <?php include ("../_bin_/config.php"); // connect to the mysql server $link = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($DB_NAME) or die ("Could not select database because ".mysql_error()); // create tables on database $user = "create table users ( username varchar(30) primary key, password varchar(32), userid varchar(32), userlevel tinyint(1) unsigned not null, email varchar(50), timestamp int(11) unsigned not null )"; $auser = "create table active_users ( username varchar(30) primary key, timestamp int(11) unsigned not null )"; $guest = "create table active_users ( username varchar(30) primary key, timestamp int(11) unsigned not null )"; $ban = "create table banned_users ( username varchar(30) primary key, timestamp int(11) unsigned not null )"; mysql_query($user, $auser, $guest, $ban) or die ("Could not create tables because ".mysql_error()); echo "Tables have been installed."; echo "<a href=install_3.php>Click here to continue</a>" ?> What am I doing wrong?? -Thanks Guys
  14. I am trying to make a database installer, when I mean when I say that is: instead of changing my config.php file manually, I want a php script to do it for me, and automatically add the tables I need, and automatically add an admin user to the database under the admin table, and I want to know how I can go about doing this? I think I can get the tables and adding the user, but how do I go about editing my config file? I need to add variables in my config file. Is there a way I can use a .sql file to add the tables, and users to the database through php? any help? -Thanks
  15. Lamez

    New Error

    oh ok I got that fixed, but it is not working right! try for your self http://uploads.lamezz.com/vote/start.php
  16. Lamez

    New Error

    ok I got the last error fixed what does this mean?
  17. Lamez

    New Error

    ok I get this error here is line 15 $insert = INSERT INTO $table (field) values ('$email')); I am not sure what I am doing wrong. please help a poor noob -Thanks Guys!
  18. Lamez

    New Error

    hey wow thanks! can you help me with this one? this is my "insert.php" it suppose to take the inputed address from start.php and add it to the database and redirect to mailing.php to e-mail but it does not add the e-mail to the database, and it does not redirect. here is the code <?php include ("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); // insert the data // always set a form condiction..... if(isset($_POST['submit'])){ //<<<<dont post within database statements...... $email=$_POST["email"]; $insert = mysql_query("insert into $table values ('$email')") or die("Could not insert data because ".mysql_error()); // print a success message echo "E-Mail Added To Database, starting to e-mail."; echo "<meta http-equiv=Refresh content=2; URL=mailing.php>"; } ?> -Thanks a ton!
  19. Lamez

    New Error

    well I think I fixed all the ";" problems please look at it again and tell me what you think, cuz I am still getting the same error <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <title>Mailing Peep</title> <meta http-equiv="Refresh" content="60; URL="mailing.php"> <?php include "config.php"; mysql_connect($server, $db_user, $db_pass) or die (mysql_error()); $result = mysql_db_query($database, "select * from $table WHERE email = '$email'") or die (mysql_error()); while ($qry = mysql_fetch_array($result)) { $qry[email] = $email $to = "comptech21@gmail.com"; $subject = "Lubbock Cooper High School Band"; $message = "I would like to vote for Lubbock Cooper High School Band!"; $from = $email; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Being Sent. Your vote will be sent ever 60s or in 1 Minuet. What ever e-mail you entered will be used as the returend address. Please do not close this window."; } ?> </html> -Thanks Again!
  20. Ok on my mailing script it is suppose to call the e-mail from the database and e-mail someone per minuet but I get this error here is line 15 here is the script <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <title>Mailing Peep</title> <meta http-equiv="Refresh" content="60; URL="mailing.php"> <?php include "config.php"; mysql_connect($server, $db_user, $db_pass) or die (mysql_error()); $result = mysql_db_query($database, "select * from $table WHERE email = '$email'") or die (mysql_error()); while ($qry = mysql_fetch_array($result)) { $qry[email] = $email $to = "comptech21@gmail.com"; $subject = "Lubbock Cooper High School Band"; $message = "I would like to vote for Lubbock Cooper High School Band!"; $from = $email $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Being Sent. Your vote will be sent ever 60s or in 1 Minuet. What ever e-mail you entered will be used as the returend address. Please do not close this window."; } ?> </html> -Thanks
  21. I am trying to make a e-mail script that will e-mail a someone ever minuet using there e-mail they input. Well I get this error on the insert.php (add's the e-mail to the database) line 13 is blank. ?? Here is the whole script <?php include ("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); // insert the data // always set a form condiction..... if(isset($_POST['submit'])){ //<<<<dont post within database statements...... $email=$_POST["email"]; $insert = mysql_query("insert into $table values ('$email')"); or die("Could not insert data because ".mysql_error()); // print a success message echo "E-Mail Added To Database, starting to e-mail."; echo "<meta http-equiv=Refresh content=2; URL=mailing.php>"; } ?> -Thanks Guys
  22. I here is one error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /mounted-storage/home48c/sub007/sc33591-LWQU/uploads/vote/insert.php on line 8
×
×
  • 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.