|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
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, roi |
|
#2
|
|||
|
|||
|
roi,
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"); mysql_select_db("database",$db); $result = mysql_fetch_array(mysql_query("SELECT * FROM index WHERE id = $id")); [/code] DevShed and webmonkey's got a few tutorials that you can follow.. good luck, scoobydoo |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > making advertisement with mysql and php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|