PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 3rd, 2005, 01:22 PM
polopolo polopolo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 polopolo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
Thumbs down How to make a dinamic php??

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

Reply With Quote
  #2  
Old February 3rd, 2005, 03:34 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 5
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.

Reply With Quote
  #3  
Old February 3rd, 2005, 05:56 PM
polopolo polopolo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 polopolo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
Quote:
Originally Posted by Madpawn
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.



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

Reply With Quote
  #4  
Old February 3rd, 2005, 06:46 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 5
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.

Reply With Quote
  #5  
Old February 4th, 2005, 06:17 AM
polopolo polopolo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 polopolo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
Quote:
Originally Posted by Madpawn
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.



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...

Reply With Quote
  #6  
Old February 4th, 2005, 11:46 AM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 5
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.

Reply With Quote
  #7  
Old February 4th, 2005, 05:57 PM
polopolo polopolo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 polopolo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
Quote:
Originally Posted by Madpawn
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.



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.";

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > How to make a dinamic php??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT