Reply to Re: How to get value of an input box into php? is it possible? syntax?

Your name:

Reply:


Posted by Matt Brown - identify on 07/14/07 01:12

On Jul 13, 12:23 am, Alexey Kulentsov <a...@inbox.ru> wrote:
> Matt Brown - identify wrote:
>
> Nothing to do with PHP is here. Learn Javascript and DOM.
>
> use document.getElementById('textFieldId').value to get current text
> use document.getelementById('checkboxId').checked to test checkbox
> use document.cookie to work with cookies
>
> > Hello,
>
> > My goal is to make an input check box that saves an input text to a
> > cookie when checked and destroys the cookie when unchecked.
> > I figured i could use the onclick method of the input box to execute
> > the PHP function setcookie, but how do I get the value from the input
> > text? Testing with the window.alert function, inputtextName.value
> > doesn't work in the PHP:
>
> > <html>
> > Your name:
> > <input class="selectstyle" type="checkbox" name="savename"
> > onclick='window.alert("savename.value")'><br>
>
> > <input class="inputstyle2" type="text" name="name" value="<?php echo
> > $_COOKIE["name"]; ?>">
>
> > literally "savename.value" is alerted.
>
> > I need the cookie value to echo.
>
> > Help is appreciated,
>
> > Matt

Thanks Alex. I'll take a look. I'm sure it'll work fine.

[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

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