1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    HI all,

    I have been wonderig if any one can help me in creating a database driven web site for making free ads but only the owner can delete their own ad or the admin.

    If someone can just tell me the logic and I will take it from there, (im very newbie to this mysql and php)

    This is what i know,
    I can create via my web page an empty databse in mysql. Though i dont know how to populate it. I can connect to it via telenet but I dont know any commands or so in making tables via telenet.
    Im aware of the phpadmin for mysql that lets one create table and row n what not... I installed it but it wont seem to work but nevermind I will work on trying to make that work,

    Now when this datase is done I would want the user to be able to delete their own add if they wanted to via their user name and password which they gona have to have by registering first with a form. so I think for this matter only (pass and login) there will need to be a separate table rite? or can it be just added on to one table for this overall purpose.

    and lastly how would i query this database using the php language.

    Thanks a lot,

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Sydney, Australia
    Rep Power

    1. well.. take a look at http://hotscripts.com/PHP/Scripts_and_Programs/
    They've got a few ad management scripts there.. perhaps they can help you write your own?

    You can use the mysql_query php function, but before you do that.. you will need to connect to the database, using mysql_connect and mysql_select_db.

    An example would be,

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    $db = mysql_connect ("localhost","username", "password");
    $result = mysql_fetch_array(mysql_query("SELECT * FROM index WHERE id = $id"));

    DevShed and webmonkey's got a few tutorials that you can follow..

    good luck,

Similar Threads

  1. Invalid characters with PHP and MySQL
    By gio50000 in forum MySQL Help
    Replies: 2
    Last Post: November 18th, 2004, 08:59 AM
  2. blank screen when using php & mySQL database
    By bigzane in forum PHP Development
    Replies: 7
    Last Post: November 14th, 2003, 09:13 PM
  3. Cronjob madness
    By eliteboo in forum Linux Help
    Replies: 10
    Last Post: July 14th, 2003, 10:49 AM
  4. Replies: 2
    Last Post: December 31st, 2002, 09:06 AM
  5. PHP Connecting to MySQL Problems
    By m3avrck in forum MySQL Help
    Replies: 4
    Last Post: December 5th, 2002, 10:06 AM

IMN logo majestic logo threadwatch logo seochat tools logo