473,763 Members | 6,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Validation, variable problem

Hi,

i use phpdev and I have a stupid problem.

I use a form and I want to pass a variable (name) from one page to
another (overview.php).

.........
<form method="post" action="overvie w.php">
<table width="100%" border="0">
<tr>
<td width="24%">Nam e : </td>
<td width="76%"><in put type="text" name="name"></td>
</tr>
<tr> ............... .

when I fill in something, the name variable will be passed when i press
the submit button, but the strange thing is, that it doens't pass
anything to overview.php !!!!

a piece of overview.php:
......
<td width="18%">Naa m van het bedrijf: </td>
<td width="82%"><?p hp echo $naam; ?></td>
......
so it is very easy stuff I want (pass a variable), but in phpdev (have
tried every version i found on the net) i doesn't work, but in my
webserver (www.xyz.be) it works!!!! it give the good value through...

has anybody has a solution? because i need phpdev to work (i go on
holiday a need to finish some stuff)

thx
geronimo

Jul 17 '05 #1
3 1638
On 25 Jun 2005 10:34:09 -0700, "geronimi" <we******@hotma il.com> wrote:
<td width="82%"><?p hp echo $naam; ?></td>


http://uk2.php.net/register_globals
http://uk2.php.net/manual/en/languag...predefined.php
http://uk2.php.net/manual/en/faq.mis...egisterglobals

--
Andy Hassall / <an**@andyh.co. uk> / <http://www.andyh.co.uk >
<http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
Well, from what i can see
you've got
<td width="76%"><in put type="text" name="name"></td>

but here you have

<td width="82%"><?p hp echo $naam; ?></td>

i don't know if that was a typing error while typing on to the newsgroup,
but it'd probs worked if you changed the input name to naam.
eg.
<td width="76%"><in put type="text" name="naam"></td>
---
Kathryn (Fire Juggler)
http://www.firejugglers.34sp.com
http://www.cornwalljugglers.co.uk
"geronimi" <we******@hotma il.com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
Hi,

i use phpdev and I have a stupid problem.

I use a form and I want to pass a variable (name) from one page to
another (overview.php).

........
<form method="post" action="overvie w.php">
<table width="100%" border="0">
<tr>
<td width="24%">Nam e : </td>
<td width="76%"><in put type="text" name="name"></td>
</tr>
<tr> ............... .

when I fill in something, the name variable will be passed when i press
the submit button, but the strange thing is, that it doens't pass
anything to overview.php !!!!

a piece of overview.php:
.....
<td width="18%">Naa m van het bedrijf: </td>
<td width="82%"><?p hp echo $naam; ?></td>
.....
so it is very easy stuff I want (pass a variable), but in phpdev (have
tried every version i found on the net) i doesn't work, but in my
webserver (www.xyz.be) it works!!!! it give the good value through...

has anybody has a solution? because i need phpdev to work (i go on
holiday a need to finish some stuff)

thx
geronimo

Jul 17 '05 #3
<?php
if(!empty($_GET )) extract($_GET);
if(!empty($_POS T)) extract($_POST) ;
?>

solved the problem!

thx lads!

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2308
by: webbedfeet | last post by:
Hi I hope someone can help me. I have a client side form validation script which works perfectly in IE but clicking "Submit" in Mozilla does nothing - the form won't submit. Is there something I can use that will work for both browsers, or is there something wrong with my code? I seem to think that the problem lies with the "onclick" area of the form. This is my code, such as it is... <SCRIPT LANGUAGE="JavaScript">
17
3861
by: stathis gotsis | last post by:
Hello everyone, I am tying to come up with an elegant way to process some input data that come from a form. When the user hits the 'Submit' button, i want the form to appear again with the already entered valid data filled in and prompt the user to re-enter the non-valid data. If all data is valid, i will forward to an other .php page which enters the data into a database. I tried to do this in the following way: the form always hits...
7
6997
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form is correct I need to submit to another page that uses the form data. I first tried making the form submit action= field point to the same file. When the form was correct, I tried loading the next page by using <META http-equiv refresh>. But...
27
4753
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
11
3000
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether certain fields match certain criteria, and inform the user in different ways when the data is wrong (offcourse, this will be checked on posting the data again, but that's something I've got a lot of experience with). Now, offcourse it's...
4
2633
by: Greg Scharlemann | last post by:
I'm trying to setup a dyamic dropdown list that displays a number of text fields based on the selected number in the dropdown. The problem I am running into is capturing the data already entered before the list is repopulated. For example, suppose the user selects 3 in the drop down list and 3 text fields are shown. If the user populates the 3 text fields with data and decides to change the drop down to a list of 4 or 5, how do I capture...
8
2778
by: Phil Latio | last post by:
I've been creating an application over the last few weeks and generally pleased with what I have produced but one area is irritating me, form validation. At the moment the forms are simply static html templates and the form input is checked using a validation class. Basically each form field is checked, every error is stored to an array and at the end of checking of the complete form, the array is output neatly at the top of the form. ...
7
3620
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
26
2815
by: Jerim79 | last post by:
I need to create a form that takes a number that the user enters, and duplicates a question the number of times the user entered. For instance, if the customer enters 5 on the first page, when they press next the form generates "How old are you?" 5 times on the page. The customer will answer all 5 questions then press next. Finally, all the local variables get dynamically created and written to a database. I have already taken care of...
3
3298
uranuskid
by: uranuskid | last post by:
Hey folks, I was going to include a contact form on my website. Well, in the first place that seemed an easy thing to do with a form that prompts a PHP file validating the input vaiables and using it's mail () function to send the mail. However, as I got more into that topic I realized that one should be really concerned about the validation part to prevent spam abuse. There are shiploads of 'mail scripts' available with each of them has...
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.