Jump to content

Phsycoslaya

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Phsycoslaya's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. How do I make a form and stuff to submit info into a MYSql database, and then make it so it shows up on a page.. [code] <?php $id = 1; $conn mysql_connect('Localhost', 'root', '******') or die('Could not connect'); mysql_connect_db('website', $conn) or die('Could not connect to database'); $sql = "SELECT title, body FROM news WHERE id=$id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); echo $row['title']; echo $row['body']; ?> [/code] I just don't know how to make a page for Editing it, and adding new news.. Please help.
  2. Can anybody link me a tutorial, on how to add an Edit / New / Delete button onto it and stuff.. I wanna get technical. Thanks hope to see your reply. *To be more specific* I want it so I can click edit to edit a news thing or w/e or clikc New to make a new news paragraph or click Delete to delete that news thingy. Help.
  3. I think maybe because you have no, ; "Semi-Colon" at the end of the second line. Just a guess.. im still a noob
  4. Can anybody link me a tutorial, on how to add an Edit / New / Delete button onto it and stuff.. I wanna get technical. Thanks hope to see your reply. *To be more specific* I want it so I can click edit to edit a news thing or w/e or clikc New to make a new news paragraph or click Delete to delete that news thingy. Help.
  5. NVRMIND! I got it, had a typo. once again thanks muchly ill shutup now =P
  6. Hm howcome the title doesnt wanna show? I typed this [code]<?php $id = 1; $conn = mysql_connect('Localhost', 'root', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db('phpsite', $conn) or die('Could not select database'); $sql = "SELECT body FROM notes WHERE id=$id"; $sqll = "SELECT title FROM notes WHERE id=$id"; $resultt = mysql_query($sqll) or die(mysql_error()); $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); $roww = mysql_fetch_array($result, MYSQL_ASSOC); echo $row['body']; echo $roww['title']; mysql_free_result($result); mysql_close($conn);[/code]
  7. WAnna explain what each command does so I can get it stuck in my head =P?
  8. Hello, im kinda new to the whole thing. Well not really I Got the basics. But this shouldn't be to hard.. http://razrwow.game-host.org I set up the database and all that stuff I know how to do that much so I can work the admin stuff but I wanna make my own site like that cause I downloaded that whole setup I just setup the database in MySql and stuff.. So first of all. I want to beable to type in this memo and make it show up on my webpage. [URL=http://imageshack.us][IMG]http://img155.imageshack.us/img155/3728/tableft8.jpg[/img][/URL] The Database is called, phpsite The password is Password the UserName is root the Host name is Localhost Please setup a PhP thingy for me to look at so I can find out how to do it.. like.. <?php echo '$memofromthemysqlthing' ?> or w/e you have to do. Just right it all out, doesnt have to be fancy just something to link the two.. 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.