SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Fairbanks, Alaska
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some PHP Questions

    I'm developing a support page for my website and I'm planning on using PHP.


    Basically, I build completely custom computers, so it's very hard to have a driver page that people can download drivers for.


    What I'm planning, is actually having every single driver for everyones computer on my site, and a link to each.


    I'm going to have a page that has a place where you can enter your custom model number, and it bring up a page with a link to each driver...


    I need an administration page where an employee can add a new computer to this database...

    It would just be:

    Enter model number: (textbox)

    Enter motherboard model: (textbox)
    Enter motherboard download path: (textbox)

    Basically... if someone enters " /drivers/motherboards/msi/k7v133a/driver.exe " into that second textbox.... can I later have a link going to a variable...

    basically, if that textbox stored the string into $motherboard and put it into a database slot called motherboardpath

    can I later pull the string motherboardpath and have it be a link? Is it possible?

    So when someone clicks something.... <a href="**that path right here**">Download Driver Here</a>... can that work? is it possible?

  2. #2
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, it would be something like
    PHP Code:
    <?php
    $sql 
    'SELECT driverpath FROM drivers WHERE model = '.$model;
    $result mysql_query($sql);
    $driverpath mysql_result($result0);
    echo 
    '<a href = "'.$driverpath.'">Download your driver</a>';
    ?>
    Does that help?
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •