Hello mates help need in php

Discussion in 'PHP' started by unna, Jul 5, 2009.

  1. #1
    Hello mates

    I have a query.

    I am running a news website. Just suppose my domain is www.xyz.com and my news section is in www.xyz.com/news

    Now I post an article in www.xyz.com/news and i want to publish its title on www.xyz.com.

    Can anybody tell me which code to supply by which I get my latest news title on the home page?

    Thanks
     
    unna, Jul 5, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Hmm connect to the databese and then pull the title from it ?
     
    Bohra, Jul 5, 2009 IP
  3. unna

    unna Well-Known Member

    Messages:
    3,274
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    140
    #3
    dude

    i am new to PHP...

    please explain it

    thanks
     
    unna, Jul 6, 2009 IP
  4. dj1337

    dj1337 Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If your paying i can help.. Message me.
     
    dj1337, Jul 6, 2009 IP
  5. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You need to store your post titles in a database first.

    If you already have this then you can query your database on your homepage to retrieve these titles.

    If you do not use a database and do not understand how to work with databases then you need to learn PHP/MYSQL interaction, here's a couple of good locations to learn from:

    http://www.w3schools.com/PHP/php_mysql_intro.asp
    http://www.tizag.com/mysqlTutorial/
     
    wd_2k6, Jul 6, 2009 IP
  6. samyak

    samyak Active Member

    Messages:
    280
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    90
    #6
    you said: "my news section is in www.xyz.com/news". Is this the section where you enter your news? Did someone create this for you? If yes, then you probably already have database tied in with your application.
    If that is the case, then you need to just connect to this database and fetch the news feeds.

    You will need to learn PHP/Mysql in any case.
     
    samyak, Jul 6, 2009 IP
  7. anthonywebs

    anthonywebs Banned

    Messages:
    657
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Is the title in a db? You need to tell us how the db is setup because I can give you the code for it.
     
    anthonywebs, Jul 6, 2009 IP