+ Reply to Thread
Results 1 to 4 of 4

Thread: PHP/MySQL help!

  1. #1
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    PHP/MySQL help!

    Rite guys! I have my database all set up, and I have the code to connect and I can pull the stuff off the server! But here is where I need some help!

    I want people to be able to upload their own scripts into my database, then have the page display links to the pages containing the scripts description etc.

    The database I have at the moment is called tutorials, and it contains a database called content. Within the table is a row called phptuts, and I can edit and put the links in manually, then on the page it will display the stuff I have put in.

    http://zenaxnetwork.exofire.net/tuts/tutorial.php

    Code:
      <?php 
    //The Code to Connect to the Database
    include("connect_db.php"); 
     
    //This retrieves the content and puts into an array. Notice we are calling ID 1, this would change if we wanted to call a page stored on a different row
    $text = mysql_query("SELECT * FROM content WHERE content_id =1") or die(mysql_error()); 
    $content = mysql_fetch_array( $text ); 
    Print $content['phptut'];
    ?> 
    
    All that does is Prints the stuff from the row phptut!

    What I need is an upload script for people to upload their scripts in zips/just text file etc and then have it display them on the page.

    I am also going to be requiring it to pull the latest script etc from the server!

    Can anyone help me?

    Regards,
    Zenax
    Last edited by Zenax; 08-05-2006 at 02:29 PM.
    Regards,
    Zenax

  2. #2
    lambada's Avatar
    lambada is offline x10 Elder lambada is an unknown quantity at this point
    Join Date
    Mar 2006
    Location
    Caister, Gt Yarmouth, Norfolk, ENGLAND
    Posts
    1,222

    Re: PHP/MySQL help!

    What you need then is for the scripts to be contained in a directory on the server, and the db to contain a link to that particular file and it's version id.

    e.g.
    Folder
    |
    |foo.script
    |
    |bar.script

    Databse
    tut_name | tut_version
    foo.script | 1.0.0
    bar.script | 1.0.1

    Then you'd echo/print Folder/$php[tut].

    then you just need a simple file upload script modified to insert the path and version number into the db, or update as necessary.
    Last edited by lambada; 08-05-2006 at 05:47 PM.
    Lambada - the former Account Manager (before I resigned)




  3. #3
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: PHP/MySQL help!

    Hmmmmm, the scripts I have already I fount on the interent, so i am a bit of a novice at PHP so it might take a while!
    Regards,
    Zenax

  4. #4
    oab's Avatar
    oab
    oab is offline
    x10 Lieutenant oab is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Olympia, WA
    Posts
    459

    Re: PHP/MySQL help!

    if you need more help AIM me.
    http://www.teamoab.com

    aim:dknigh73
    msn:d_knight_3@hotmail.com

+ Reply to Thread

Similar Threads

  1. php/mysql help
    By Dub_Dude in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 01-24-2006, 03:17 PM
  2. PHP/MySQL Search Engine
    By o0slowpaul0o in forum Tutorials
    Replies: 9
    Last Post: 08-06-2005, 02:12 PM
  3. PHP/MYSQL Developer
    By jhewit in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 06-08-2005, 01:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers