Reply to Re: help on online-shopping cart..

Your name:

Reply:


Posted by Maiku Mori on 04/16/07 13:21

On Apr 16, 12:25 pm, "shotokan99" <soft_devj...@yahoo.com> wrote:
> ok so mean i need to convert it to a form..like this:
> <form name='reg' method='get' action='rem.php'>
> while (..){
> // display the data here...
> }
> </form>
>
> on this line instead of a link ill change to a submit button:
> echo '<font face="Verdana" size="1"><input type="submit"...>
>
> then my rem.php contains:
> <html>
> <head>
> </head>
> <body>
> <?php
> session_start();
> $user = $_SESSION['myuser'];
> $id=$_GET['id'];
> .
> .
> .
>
> am i getting it right? sorry im new to this so im making things as
> detailed as possible. tnx;-)
Could work but I think something like:
session_start();
$user = $_SESSION['myuser'];

while (..){
echo $nameOfItem + ' (<a href="remove.php&amp;id='+$idOfItem
+'">Delelte</a>) '; //You can wrap it into a table, this is just
example.
}

if isset($_GET["id"]) {
$remId = mysql_real_escape_string($_GET["id"]); //Or whatever user
input check/prepare function you want to use.
$query = "delete from cart where cuser = '$user';
AND id = '$remId' ";
mysql_query($query);
}

I don't want to discourage you, but have you tried checking free php
cart scripts? At worst case you will find good programming approaches/
examples there.

~Maiku

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация