|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
getting text
I want to retrieve the current text from a text input field in a form, so far the only way I've found is by submitting the whole form and getting via $_POST. This is not ideal, could someone point me in the right direction? I'm fairly new to php and spend most of my time looking at completely the wrong part of the manual but I'm sure the answer is usually in there.
Cheers folks, Alan |
|
#2
|
|||
|
|||
|
RE: getting text
i dont understand what you mean, as far as i know, the only way you can get text from a text input field is by submitting the form..
|
|
#3
|
|||
|
|||
|
RE: getting text
what I'm after doing is providing a textbox and a button in one frame. The idea is to enter a url in the textbox and click the button. This should then load the url in a second frame. I wanted to use the present value of the textbox to set the 'action' part of the form to the url. Of course if there is another way of achieiving the result I'd be happy to hear of it.
Alan |
|
#4
|
|||||
|
|||||
|
RE: mysql?
Here's a basic script to do what you want...you will load this in the top frame to show the text field and button and when it is submitted, it will go in the bottom frame...it has basic error checking just to make sure the http:// wasn't left off...
php Code:
|
|
#5
|
|||
|
|||
|
RE: getting text
okay I've been playing with variations of your code for some time and can't get it to work, the lowerframe is changed, but to a blank page/frame. Everyhting up to the header(Location:....) works but even if you put in absolute address the result is the same. Looking at the online manual it seems lots of folks have had problems with header() and it leads to me to suspect that I may be affected by a bug in the browser, however its the only one I've got to play with so I can't check it.
Any further suggestion are still appreciated and thank you for the help so far. Alan |
|
#6
|
|||
|
|||
|
RE: getting text
You might try switching out the header line with this:
|
|
#7
|
|||
|
|||
|
RE: getting text
go Matt!
Cheers for that, it works now and is as lovely as it needs to be. Like I said I am new to the business of both php and html and not surprisingly the little niggles of both keep catching me out. Still I'm getting better and so long as good folks such as those that inhabitat the community here keep doing what they're doing it will soon enough be me handing out help to other folks. Once again thanks and keep it up chaps (and chapesses!) Alan. |
|
#8
|
|||
|
|||
|
RE: Which version
Which version of PHP you are using if it is older than 4.2 than.. use $HTTP_POST_VARS[]; instead of $_POST
ok? |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > getting text |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|