Reply to Re: can't get variable into the query

Your name:

Reply:


Posted by mens libertina on 10/10/58 11:50

cashmere@t-online.de wrote:
> Thanks Geoff but the form posts the text OK, the variable $joketext
> from the form is updated just fine. It's the WHERE id = '$id' part that's
> obviously not getting passed any value.

> I've got the session variable containing the value that I need but
> can't get it into the statement. I've tried umpteen variations trying
> to get the value of the variable into the query.
> Any ideas? Like I said I'm a newbie but trying to learn.


$_SESSION['id'] = '$_POST';
?>
<html><head></head><body>
<?php
$id = $_GET['id'];


I think here is your problem. First, you are trying to put an array
into a session variable, which is a no-no. Second, you are rewriting
that same variable with the result of GET, even though you are POSTing
your form. Just that line alone would give you an $id = 0, if I
understood correctly that you are using POST.

$.02

[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

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