Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP Programming .. news page
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

PHP Programming .. news page

Hello guys !

how are you all .. ?? Hope you are all good ...

i'm new to php programming .. and i have a php script that programmed by one of my friends ..." well he is not programming now " ...

the script contains news system in the home page that shows the last 5 news added to the database ( "news" table ) .. but don't have a news page that collects all the news and puts it in to one page as news pages or news archive ...

so i need a code that collects all the news from the table " news " in my database , and i will but that code in a new page instead called news.php ...

can any one help me to get this code .. ??

«1

Comments

  • db connect
    select * from news
    while echo title, text, date, author

  • can you please type this code and give it to me please ??

  • BlueVMBlueVM Member

    @serverian said:
    db connect
    select * from news
    while echo title, text, date, author

    Yeah that's about it.

  • jakejake Member

    ^

  • just give me a written example please ^_^ ... sorry for incon. :)

  • BTW .. i need it to collect all the news in the table and sort them ...

  • You said help! Not "code me this"

  • MicrolinuxMicrolinux Member
    edited July 2013

    @legendofalex said:
    can you please type this code and give it to me please ??

    if (payment === money) { give_code(legendofalex); } else { check_google('php tutorial'); }

    Thanked by 2MrObvious jake
  • @Microlinux said:

    what is the wrong with that .. ?? if you can help for no money okay .. i just need it written cuz im aspx programmer not PHP ....

  • Write that in aspx then and I'll give you php code.

  • InfinityInfinity Member, Host Rep

    If you're a programmer already, you should be able to get your head around the documentation and tutorials already available on the internet to be frank.

  • @Infinity said:
    If you're a programmer already, you should be able to get your head around the documentation and tutorials already available on the internet to be frank.

    Okay thanks for your Zero Help :)

  • @serverian said:
    Write that in aspx then and I'll give you php code.

    Okay :)

  • manacitmanacit Member
    edited July 2013

    -snipped-

    Put this script as index.php in your web root and then give us the url, with that information we'll be able to help you more easily.

  • netomxnetomx Moderator, Veteran

    Damn I love these type of threads!

    Inb4 new post: can you please helpe configure apache so I can order a pizza from it? Just log on to my VPS and do it. Guess the IP btw

  • netomxnetomx Moderator, Veteran

    Damn I love these type of threads!

    Inb4 new post: can you please helpe configure apache so I can order a pizza from it? Just log on to my VPS and do it.

  • netomxnetomx Moderator, Veteran

    @manacit wow, nice code. Legend, you should do that

  • anyNodeanyNode Member, Host Rep
  • legendofalexlegendofalex Member
    edited July 2013

    @serverian said:
    Write that in aspx then and I'll give you php code.

    Okay :)> @manacit said:

    -snipped-

    Put this script as index.php in your web root and then give us the url, with that information we'll be able to help you more easily.

    think you self Clever ?? :)

  • anyNodeanyNode Member, Host Rep
    edited July 2013

    @manacit said:
    -snipped-

    Put this script as index.php in your web root and then give us the url, with that information we'll be able to help you more easily.

    Lol'd.

  • BlueVMBlueVM Member

    @legendofalex - Please give me the structure of the database and I'll whip up a quick piece of code for you. A $5 - $10 donation for my time would be appreciated, but not necessary.

  • @netomx said:
    Damn I love these type of threads!

    Inb4 new post: can you please helpe configure apache so I can order a pizza from it? Just log on to my VPS and do it.

    what is the wrong with my question ... ?? told you ... the table called news ,...
    just a code that gets all content in that table ...

    all of you are some ***********

    gonna close this thread

  • serverianserverian Member
    edited July 2013
    <?php
    mysql_connect("hostname", "user", "password");
    mysql_select_db("mydb");
    $result = mysql_query("select * from news");
    while ($row = mysql_fetch_object($result)) {
        echo $row->title;
        echo $row->text;
    }
    mysql_free_result($result);
    ?>

    Taken from php.net

  • @BlueVM ...

    Inbox ... gonna send you the database details

  • @serverian Thanks for your help dude ... hope that works for me .. really thanks ... that's what i was wondering ... :)

  • anyNodeanyNode Member, Host Rep

    @legendofalex said:
    gonna close this thread

    Please check the W3Schools link I posted. It is very informative.

  • @anyNode

    Thanks Bro .. i apreciate that :)

  • anyNodeanyNode Member, Host Rep

    @legendofalex said:
    anyNode

    Thanks Bro .. i apreciate that :)

    No problem :)

  • MunMun Member
    edited July 2013

    @manacit said:
    -snipped-

    Put this script as index.php in your web root and then give us the url, with that information we'll be able to help you more easily.

    For anyone not PHP smart.... DO NOT PUT THIS CODE IN YOUR PHP SCRIPTS THIS = BAD!!!!!!!!!!!!!!

    Next @manacit, you come after me for "testing" ddos statements and yet you are suggesting to someone to put a code that can quickly compromise the whole server. GG!

    Also, it wasn't funny at all.

    Mun

  • @Mun but then they'd have something to pen-test with! That's probably how SolusVM writes their code!

Sign In or Register to comment.