Jump to content

thunderbox

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Everything posted by thunderbox

  1. hey guys, i have a script that drags variables in a loops. as this is the only way that i can use the mysql_fetch_array command. this is my script that gets the info. $userid = $_SESSION['userid']; $mysql = mysql_query("SELECT * FROM profile WHERE userid='$userid'"); if ($mysql > 0) { while ($row = mysql_fetch_array($mysql)) { $p_displayname = $row['displayname']; $p_quote = $row['quote']; $p_name = $row['name']; $p_age = $row['age']; $p_location = $row['location']; $p_links = $row['links']; $p_photo = $row['photo']; $p_about = $row['about']; $p_gender = $row['gender']; } } and i want the variables start with $p_ to be able to be sent over the site so i can put them in a form field so i can use the mysql 'update' command. is there any easy way to do this. cuz mine isnt really working properly.
  2. it worked thanks guys. however i want to apply this to 2 fields in my form, not just one. (About and Links). what is the easiest way to implement this. or do i jsut copy the function twice?
  3. thanx guys. ill see if i can get it to work later tonight!
  4. hey, im making a website, its not a forum or anything like that but it does require the user of BBcode. i decided to use this because allowing the users to use html (like how myspace did) creates too many security risks and i like my design how it is so i am going to keep it anyways. i want to know how i can implement BBcode on my page. i need all the basic functions. does anyone have any areas of expertise here. ive looked at multiple tutorials but i get lost in them all . does anyone have a link to a good on? thanx
  5. i think i solved it. using an if statement i managed to change it. and it seems to work so far. so ill mark this thread as solved.
  6. here is my code. where would i put the exit; ? $email = mysql_real_escape_string($_POST['email']); $password = mysql_real_escape_string($_POST['password']); if ($password == '') {echo 'The Password Field Was Not Filled In';} if ($email == '') {echo 'The email Field was not filled in';} $password = md5($password); $login = mysql_query("SELECT * FROM users WHERE email='$email' and password='$password'"); $login2 = mysql_num_rows($login); if ($login2 > 0) { $userid = mysql_query("SELECT userid FROM users WHERE email='$email'"); // Write Session Data $_SESSION['userid'] = $userid; $_SESSION['auth'] = true; echo 'login sucessful!'; }
  7. hey, i have a signup and login form. i need them to dissapear when they are submitted. i know that i can use a header redirect however i am not sure on how to implement this. the login form is on my main page. and its running a confirmation message through an echo statement. the echo statement shows up. but the login form does not go away. so my question. how cna i get the form to go away. and how could i do it through an echo statement (i have heard you can do it this way )
  8. im using Zend Studio and it says that my functions are void. im not sure why as they all follow this format function name() { } so i have no idea what is going on. this happened with all of my functions so far (i was using a function to do a database connect as well. but when that didn't work i decided to change it to an include and now it works) btw. this is my first real go at using function as i thought it would reduce error checking time as it is all on the one file. but obviously i was wrong. lol
  9. i jsut tried using include_once() and it now comes up witht he other error "Fatal error: Call to undefined function register() in C:\Program Files\xampp\htdocs\stuff\******\register.php on line 7"
  10. yes it works if the code is directly in the page. the files area ll in the same directory. where would i put the require_once() would it be directing towards the header.php file or toward the function.php file?
  11. Hey, ive written a series of functions in Zend. It says on one of the left panes that they are void. what does this mean and how do i fix it? thanx.
  12. Hello, i have a website, and i am for the first time running it though functions in an external file (functions.php). how i have set up the page i have a header and a footer (both as includes in their respective places) in the header i have included the file 'functions.php'. yet, when i reference the function (e.g. with login or signup) its says this error goes away when i include the file 'functions.php' directly into the document. however whnen i do this i get this error. i am not sure how i can fix the problem, and it is causing to be a major setback int he design and development of the website as i cant get it fixed. any help is appreciated!
  13. what do i put in the "where..." or does that just stay there? i hvae no idea about the code that you just put up.. lol.. im having trouble understanding it
  14. hey guys.. im having a little trouble getting data from my database to the script... i realy dont know how to do it.. im making a very simple blog site, which is more like a bulletin site in which people can leave comments but only after they register i have been successful in getting both the user to register and getting the blog they post into the database, but i don't know how to display the database on the main page.. how would i do this? btw. my database has 4 fields that need displaying username, date, title and content.. and im not sure if i should put the unique ID in there.. so if someone could figure out how to put those details into variables. i had a small idea of how to do this but im not sure on how to do it for every post, i think it is done through looping but i am not sure. thanks for your help, im a complete newbie (4 days of programming)
  15. is there any way to make a form submit script in PHp on dreamweaver? or do i ahve to do it elsewhere!
×
×
  • 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.