Reply to Re: Passing on a value to a SUBMIT button - can it be done?

Your name:

Reply:


Posted by Siv Hansen on 09/30/05 04:00

> Marcel wrote:
>
>> I'm creating an application with which I can update values in a MySQL
>> database.
>> Each row of the database table is a web page with a form. After
>> updating the
>> fields, the new values are passed on the database table by pressing the
>> Submit-button. So far, no problems. Then I want to go on to the next
>> page,
>> so I was hoping that something like this would work:
>>
>> echo '<form method="GET" action ="de.php?pageno=5">';

write echo '<form method="get" action="">'

and then change your code in de.php to
if(isset($_REQUEST['page'])){
//connect to your database
//query the database for page where id=the value in $_REQUEST['page']
//retreive html-page and display

}else{
//display normal de.php
}
>>
>> But it doesn't. I keep on coming back to page 1.
>> What should I be doing?
>>
>> Thanks, Marcel
>>

There was a comment on hidden fields. Variables carried by urls are easy
to manipulate,
and although it looks cool (yes it does) perhaps you should avoid them.
Then the method is
post, not get, but the code in de.php remains (since you use the
REQUEST-method which accepts both POST and GET)

[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

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