Jump to content

kurtis

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kurtis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. in reply to http://www.phpfreaks.com/forums/index.php/topic,95426.0.html its all well and good putting things in collums but what about if you want 2 put wats in those collums in order? this is something im trying 2 do with a widget system. Ive go all my info(widget name, x location(collum) and y location(order in collum) and i want to stick the widgets in the rite place but cant get my head around it ??? anyone got any ideas? thanks
  2. hi, i got a problem... when i try and include a page i get a permissions problem: Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration the page im including is to localhost/news.php?item=blablabla I have to include it like that instead of news.php?item=blablabla because if its included like news.php?item=blablabla then it looks for a page with all of it as the name. anyone know what could help? thanks. P.S im running xampp server.
  3. i want to create a search engine system like on myway.com which will hav a search box on my page with options to which search engine you use. When the search results are returnd i wish to display them in my own page. so first off i want to ask if i can even do this in php? or will i need to learn some perl and make a spider type system to search and then pick up the results and print them on my page? Secondly if i can do this in php can someone point me in the right direction to get me going please! thanks
  4. [code] <?php session_start(); include ('db.php'); $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $id = $_SESSION['id']; if ((!$to) || (!$subject) || (!$message)){ echo 'You did not supply the following needed infomation<br>'; if (!$to){ echo 'username-We need to know who the message is going to!<br>'; } if (!$subject){ echo 'subject-You need a subject!<br>'; } if (!$message){ echo 'message-Currect me if im wrong but you are trying to send a message so obviously you need a message!<br>'; } include ('message.php'); exit(); } $id_get = mysql_query("SELECT * FROM users WHERE username='$to'") or die (mysql_error()); $to_id = mysql_fetch_array($id_get); $no_id = mysql_num_rows($id_get); if($no_id <1){ echo 'the user isnt in our database<br>'; include ('message.php'); exit(); } $to_id = $to_id['id']; $msg_id = mysql_insert_id(); $ip = getenv('REMOTE_ADDR'); $read = '0'; $query = mysql_query("INSERT INTO messages (id, subject, sender_id, to_id, read, sender_ip, text, time) VALUES('$msg_id', '$subject', '$id', '$to_id', '$read', '$ip', '$message', now())") or die (mysql_error()); ?> [/code] if the error is something simple slap me real hard! lol
  5. im making a messaging system, very simple and easy but i get this error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read, sender_ip, text, time) VALUES('0', 'dthdjh', '6', '7', '0', '127.0.0.1', '' at line 1" the code for the mysql query is: [code] $query = mysql_query("INSERT INTO messages (id, subject, sender_id, to_id, read, sender_ip, text, time) VALUES('$msg_id', '$subject', '$id', '$to_id', '$read', '$ip', '$message', now())") or die (mysql_error()); [/code] does anyone know how to solve this error? thanks
  6. to late my friend! lol ive allready started :P im currently working on the friendship system n neally completed that n then im moving onto the picture uploading/album veiwing probibly, im also making a custom forum for it which is quite fun!
  7. would this idea work: [code] <?php $url = $_SERVER['REQUEST_URI']; $user_check = "SELECT * FROM users WHERE username='$url'"; $result_user_check = mysql_query($user_check); $userfound = mysql_num_rows($result_user_check); if ($userfound < 1) { $error = "user or directory was not found."; } else { $user_info = mysql_fetch_array(mysql_query($user_check)); $_SESSION['username1'] = $user_info['username'] //rest of the sessions........... ?> [/code]
  8. hi, does anyone know how i can get what is after the slash in a URL? im wanting to edit my 404 error page so if people go to blabla.con/username it will search the database for the username and if its there save all the needed info to a session and forward the reader to profile.php and display the info. All i need is how to get the URL thing i can do the rest but obviously if someone allready has the code somewhere i wouldnt mind them copying it all in  ;D Also if anyone knows a easyer way to do this then sugestions are welcome :) thanks
  9. thanks for your help :D but now it says unexpected t_string :( its not my lucky day! lol
  10. ye i thought that :S i rote it originally i had a few errors so i asked my mate for advice(hes been doing it longer than me) n he just messed round with the connection till it came up with this error and the he didnt know what to do :S this is the one i had before: [code] $query = mysql_query('INSERT INTO users VALUES(id=$id, username=$username, encryptpass=$encryptpass, password=$password, name=$name, prov=$prov, style=$style, hist=$hist, infl=$infl, open=$open, webs=$webs, email=$email, signupdate=now()') or die (mysql_error()); [/code]
  11. db.php: [code] <? $link = mysql_CONNECT(localhost,root); mysql_select_db(dijeridooo); if (!$link) { die('could not connect:' . mysql_error()); } echo 'connection succesful'; ?> [/code] (i added the echo just to make sure it was connecting) registration file: [code] $query = mysql_query('INSERT INTO users VALUES(id, username, encryptpass, password, name, prov, style, hist, infl, open, webs, email, photo, signupdate') or die (mysql_error()); [/code]
  12. yes its the annoying "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" error! im follwing the user system tutorial but made my own registration page becuase i couldnt get the other one working so i made my own which seems to promise more but i still get this error and i dont know why  ??? anyone got any ideas? thanks
×
×
  • 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.