Forum Moderators: coopster

Message Too Old, No Replies

need to add a new product to my php database

How to add a new product to my php database

         

amythepoet

5:17 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh boy, I"m stuck again! I would like to add a product to my php database and don't know

please help

Mark_A

6:01 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How did you add the original records?

amythepoet

6:21 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I did not do it, another guy did and he has flown the coup

Mark_A

6:31 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oh, I see.

Sorry I don't know much about php databases. I usually work with MS access dbases and the like. Usually there is some kind of table view in which you can view the contents of the table and add records also.

Hopefully someone who knows about php databases will be along shortly. :-)

amythepoet

6:37 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yup, I hope so thank you

Mark_A

7:41 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



oh, amythepoet I think you are mistaken in your terminology.

php is the scripting language, the programming code. The database will usually be something like "mysql". You might benefit by reading up at some of the tutorials linked in this google search:

[google.co.uk...]

amythepoet

7:56 pm on Apr 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have read that and it's all Greek to me, if somebody there could help me, I would be grateful

Tommybs

8:25 pm on Apr 19, 2010 (gmt 0)

10+ Year Member



Do you have access to the site via ftp? I.E can you find a file with an example of how products are retrieved from the database?

dreamcatcher

6:20 am on Apr 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi amythepoet,

Doesn`t the system you are using have some kind of admin area to log in and add products? I can`t believe someone would design something that requires you to enter your database and manually add things.

dc

amythepoet

11:17 am on Apr 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, yes I can log in , the guy who made the database is gonzo , I have now added the product but do not know how to fix it to connects to my order page

I have a straight payment form,no shopping cart, it hsould be a simple thing, but i am having a dilly of a time

amythepoet

9:33 pm on Apr 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, I'm getting there, slowly, but i n eed to find the value of an item and don't know where to look

it should be anumber like this: option id="id-18" value="18:120.00:180.00">

HELP!

amythepoet

12:23 am on Apr 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



making little more progress, I found the value, now I found the file that I need to update, , here is what it says now, here is a snippet, do I add the new product somewhere in here:

$i = 0;
while ($row = mysql_fetch_assoc($toast_rs))
{
$i++;
?>
<option id="id-<?=$row['id']?>" value="<?=$row['id']?>:<?=$row['price']?>:<?=$row['rush_price']?>"><?=$row['description']?></option>
<?

mack

12:46 am on Apr 21, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



From your last thread you mentioned you had phpmyadmin. This is the tool you use to add items to the mysql database. The code you are using will call items from the database, but you need to be sure your data has been inserted.

Mack.

amythepoet

12:52 am on Apr 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ya, I am soo confused,

mack

12:56 am on Apr 21, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Think of the mysql database as where data is stored. Your php code can ask the database to send it data. Are you able to login to PhpMyAdmin? Once you go in there you will be able to view your database and how it's structured.

Mack.