Posted by Jerry Stuckle on 06/02/07 01:31
Anonymous Chief wrote:
> BTW: I am reading on php from the basics onwards. I just have this project
> that needs that bit of code to be complete. My project is mainly html, and I
> have renamed the files to .php. It is mainly composed of "includes". I use
> the includes for the footer which contains links which I have setup on a
> dedicated links.php file. I just need the post/get script where a person
> would click on a link and it would send a session variable that I can then
> submit as a form.
>
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:pM6dnUBWK9n0Y8LbnZ2dnUVZ_iydnZ2d@comcast.com...
>> Geoff Berrow wrote:
>>> Message-ID: <f3mv5k0ln1@drn.newsguy.com> from Rich contained the
>>> following:
>>>
>>>> Based on what you described you'd probably need to use some basic
>>>> javascript
>>>> along with your PHP, to handle the click action that adds the item to a
>>>> "cart".
>>> I can't see any need for JavaScript.
>>>
>> Same here. Just a simple get or post request to a script which adds the
>> item to the shopping cart. Not even that much PHP code, depending on how
>> you do it.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstucklex@attglobal.net
>> ==================
>
>
> I can do a post or get, but I can only do that from a form field. How
can I
> do it from a click of a link.
>
> Can someone help me create a post/get script where a person would
click on a
> link and it would send a session variable in the form of a product
SKU that
> I can then submit as a form. Mybe in the future I will be able to use
MYSQL
> to not only send the SKU as a session variable but also look up the
SKU in
> the database then send the SKU # and SKU Details. That would be cool
if I
> could do that!!!
>
> Thanx.
>
>
(Top posting fixed)
You can't send a form from a link. All you can do is send data as part
of the URL. But that has nothing to do with PHP - that's just straight
HTML. You need to be asking those questions in alt.html.
And MySQL is a database - nothing more, nothing less. It allows you to
store data more easily. It has nothing to do with session or anything
else on the PHP/HTML side.
P.S. Please don't top post. Thanks.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|