|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I have managed to get a php script that is a simple advertisemnt posting free service for people that have stuff to sell. The way it works is that people sign up free to the service and then place their ads. The ads then show up in their main screen after submission. There is a submission page where the user give a price to the item they want to sell and include a picture of his item. And this price is shown in the advert page generated. There is a email to contact the seller also. What I want to include is a way the user can bid the highest they think the item is worth. The seller makes his own price for his item, however the user, potential buyer, then submits his own bid value in a form. This bid is then sent via email to the seller and printed immediately in the ad webpage. Other users that are interested in that item knows that there were bids and can bid also.The seller can sell then the item to who ever gives a higher bid or not. Is there a way i can do this?? Also how is possible to add categories in mysql and make the ad entries be seachable. At this testing moment all entries are together withotu any sorting or searching facility. Your help is appreciated. Polo |
|
#2
|
|||
|
|||
|
That's a lot of stuff for one question.
![]() Generally speaking, you're going to need a form for bidders, a db to keep the bids in, and a script to email bids. This will probably also mean a registration/authentication system for bidders, if you don't already have one in place. There's not a real forum-friendly way to answer such a broad request, other than to say that it can be done. I would start plotting it out and posting specific difficulties you run into. |
|
#3
|
|||
|
|||
|
Quote:
I understand your thoughts. OK. Lets focus on the form for bidders. So i was thinking this should run like this: 1. A seller puts a price, say 300 USD for his photo camera. 2. A user called A see the advert and stimates a price of 200 and goes to the form and place 200 USD. 3. The bid is send to the user to approve it and after approval is written into the page. 4. The seller receives the email with the bid of A. He can then decide to sell the camera or wait for another offer. 5. Another user B now haves to give more than 200 and less than 300, unless someone gave 299 and he desperately wants to have it can give more than 300. 6 same happens in point 3. and 4. There is already a registration of users. In order to bid and actualy see the adverts they have to log in. What do you think about this way of doing this to work? Polo |
|
#4
|
|||
|
|||
|
If the seller can choose at any point to go ahead and sell the camera, why does he have to set a price at all? It sounds like any seller's just going to post and wait for a high enough bid...
Technically speaking, though, the system sounds fine. |
|
#5
|
|||
|
|||
|
Quote:
Hi Madpawn, Imagine yourself want to sell your camera and lets say you have a friend interested. You tell him "I will sell this for 400 USD!". Your friend looks to the camera and say "well, I will give a max 300 for it". You might sell it or maybe try to sell it to another person that will give more than 300 and go closer to your asking price. The way the script should work is like this... but how to achive this i need help... |
|
#6
|
|||
|
|||
|
First thing, before you start coding anything, is to make sure you've got this planned out -- especially your db setup. Once you've charted out the db and flow of the scripts, the coding will come easier.
|
|
#7
|
|||
|
|||
|
Quote:
Here the tables of mysql that exist: $sql1 = "DROP TABLE IF EXISTS marketonline;"; $sql2 = "CREATE TABLE marketonline ( timestamp int(15) NOT NULL default '0', ip varchar(40) NOT NULL default '', file varchar(100) NOT NULL default '', userid varchar(50) NOT NULL default '' , KEY ip (ip), KEY file (file) ) TYPE=MyISAM;"; $sql3 = "DROP TABLE IF EXISTS marketprod;"; $sql4 = "CREATE TABLE marketprod ( prodid int(10) NOT NULL auto_increment, produserid varchar(50) NOT NULL default '', prodnaam varchar(100) default NULL, prodomschr longtext, prodprijs varchar(10) default NULL, prodfoto varchar(150) default NULL, proddatum varchar(10) default NULL, prodview int(11) default '0', PRIMARY KEY (prodid) ) TYPE=MyISAM;"; $sql5 = "DROP TABLE IF EXISTS marketusers;"; $sql6 = "CREATE TABLE marketusers ( userid varchar(50) NOT NULL default '', usernaam varchar(30) default NULL, usernick varchar(20) default NULL, useradres1 varchar(50) default NULL, useradres2 varchar(50) default NULL, usertel varchar(20) default NULL, useremail varchar(50) default NULL, usermsn varchar(50) default NULL, userlogin varchar(20) default NULL, userpass varchar(50) default NULL, useractive char(3) default 'no', userrank varchar(10) NOT NULL default 'user', useraantallogin int(11) default 0, userkleur varchar(50) default NULL, PRIMARY KEY (userid,userid), UNIQUE KEY userlogin (userlogin), UNIQUE KEY useremail (useremail) )TYPE=MyISAM;"; $sql7 = "DROP TABLE IF EXISTS marketsearch;"; $sql8 = "CREATE TABLE marktsearch ( zoekid int(11) NOT NULL auto_increment, zoekuserid varchar(50) NOT NULL default '', zoeknaam varchar(50) default NULL, zoekomschr text, zoekdatum varchar(10) default NULL, zoekview int(11) default '0', PRIMARY KEY (zoekid) ) TYPE=MyISAM;"; $sql9 = "INSERT INTO marketusers VALUES ('$md5_id','$naam','$nick','$adres1','$adres2','$t el','$email', '$msn','$ login','$pass','yes','god',0,'blauw');"; for ($i=1;$i<10;$i++) { $query = "sql$i"; $query2 = $$query; if (!mysql_query($$query)) $err = "yes"; } if (!isset($err)) echo "good instalation. <a href='index.ph p'>click to</a> to login."; |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > How to make a dinamic php?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|