Jump to content

biondizzle

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by biondizzle

  1. Yeah man it's true, php was alot easier than I originally intended it to be. I used to program in VB like 6 years ago when making starcraft hacks was cool, once I got my hands on it it came quite easily to me. Now I just gotta worry about how well my coding holds up security wise.
  2. worked perfect, i adjusted the about me code a touch i used <?php session_start(); if (!isset($_SESSION['id'])) { header("Location: login.php"); } include ('dbc.php'); if ($_POST['Submit'] == 'Post') $nick_name = $_POST['nick_name']; $descript = $_POST['descript']; $aim = $_POST['aim']; $cell = $_POST['cell']; $school = $_POST['school']; $music = $_POST['music']; $aspire = $_POST['aspire']; $city = $_POST['city']; mysql_query("INSERT INTO about_me (nick_name, descript, aim, cell, school, music, aspire, city, id) VALUES ('$nick_name', '$descript', '$aim', '$cell', '$school', '$music', '$aspire', '$city', '". $_SESSION['id'] ."')") or die(mysql_error()); echo("Profile Updated Successfully!"); exit; ?> brought in the id from the user table all well and good. any knowledge i know on php is from google and that w3schools website lol. While I was making this one of my friends who went to college for sql and php was kind of a dick and like "ohh you need php sessions and its alot of work, you'll never understand it", by you guys showing me that it really helped and it was alot easier than originally thought. Thanks so much! ohh and as for why i created 2 tables, he also told me that for each section i should create a new table and use the primary key from the original table so all the information "cascades" as its changed. thanks so much! it makes sense now!
  3. Damn you guys are fast on here! Thanks for getting back. Going to try this now, let you know what happens.
  4. Kind of a n00b here. on my main table (users) i named a column as "id", set it to auto-increment and as the primary key and created it like this: CREATE TABLE `users` ( `id` int(20) NOT NULL auto_increment, `full_name` varchar(200) collate latin1_general_ci NOT NULL default '', `user_name` varchar(200) collate latin1_general_ci NOT NULL default '', `user_pwd` varchar(200) collate latin1_general_ci NOT NULL default '', `user_email` varchar(200) collate latin1_general_ci NOT NULL default '', `activation_code` int(10) NOT NULL default '0', `joined` date NOT NULL default '0000-00-00', `country` varchar(100) collate latin1_general_ci NOT NULL default '', `user_activated` int(1) NOT NULL default '0', PRIMARY KEY (`id`) ) On the second table i created it like this: CREATE TABLE about_me ( about_id int NOT NULL, nick_name varchar(255), descript varchar(255), aim varchar(255), cell varchar(255), school varchar(255), music varchar(255), aspire varchar(255), City varchar(255), id int, PRIMARY KEY (about_id), FOREIGN KEY (id) REFERENCES users(id) ) I believe i imported the key correctly into my new table (about_me). Well I expected the id column to cascade down into this new table automatically which it didn't. RIght now if you log into my site and use the about me form, it posts to the new table "about_me" but it doesn't identify the user on the table with the primary key assigned to him from the first table (users). How do I use PHP sessions to identify the user by his/her id from the primary key in the table. I attached the whole site. The php for the log in is a prefab and I'm attempting to do the about me part on my own, I'm having alot of trouble with the whole sessions thing. I'm not really sure if I'm doing this correctly. so yeah any point in the right direction would be awesome! -Mike [attachment deleted by admin]
  5. i have like 80 gigs of files i want uses to search through http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx if i use that to add them all in the database, what would i add to the page to search the files?
  6. well i don't have the files on mysql i don't know how to make mysql automatically add the files into a table. thats why i was wondering if theres a simple way around to searching the files because they're all in the same folder, if indexing them is the only way could someone explain when i add a new table what do i do to have mysql index all the files in that folder itself? thanx
  7. i would like to make a search box but NOT for keywords and text. i would like to have it linked to a folder in my server that has nothing but files in it, so when someone types in part or all of the file name the file will come up. i believe this may be an easier task than a regular search because you will not have to index everything... or do you have to index everything? i don't know what the name for something like this would be but im sure its feasible with php any help in the right direction or an alternative to achieve this would be soo much help thanx a bunch in advance. -Mike
×
×
  • 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.