473,698 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PLEASE HELP - Very odd problem

I am new to PHP and I am having a very odd problem. Could some PHP
guru please help.

I am passing some variables from one page to the next, and in the
starting page, I have:

<div id="navigation " align="center">
<form NAME="addnewpoe tpoemform" METHOD="GET"
ACTION="addpoet poem.php">
<table align="center">
<tr>
<td width="20%">Poe t Name:</td>
<td width="80%"><in put TYPE="text" NAME="newpoet" SIZE="30"
MAXLENGTH="30"> </td>
</tr>
<tr>
<td width="20%">Poe m Name:</td>
<td width="80%"><in put TYPE="text" NAME="newpoem" SIZE="30"
MAXLENGTH="30"> <$
</tr>
<tr>
<td align="center"> <input TYPE="SUBMIT" VALUE="Add Poet and
Poem"></td>
</tr>
</table>
</form>

When the receiving page opens I can see, in the URL text box the
values that have been passed in.
However, I am unable to echo these values. If I have:
<table>
<tr>
<td>
<?php
// import_request_ variables(gP,"" );
$recdpoet=$_GET['newpoet']
$recdpoem=$_GET['newpoem'];
if(isset($recdp oet) and strlen($recdpoe t) 0)
echo $recdpoet;
?>
</td>
</tr>

The page opens completely blank. What might be
going wrong? I have tried uncommenting the above line, but it does not
work.
Any help or suggestions will be greatly appreciated.

Mar 3 '07
12 1494
Jerry Stuckle wrote:
I agree, Tony.
Jerry, surely we've been posting in the same groups for long enough by now
for you to have learnt how to spell my name?
echo statements work quite well.
function debug_them ()
{
for ( $i=1 ; $i<func_num_arg s() ; $i++ )
{
$val = func_get_arg($i );
if (is_array($val) )
print_r($val);
else
print $val;
print "\n----\n";
}
if (func_get_arg(0 )) exit();
}

usage:

debug_them(FALS E, $_SESSION, $some_array, $some_var);
debug_them(TRUE , $_POST);

The first parameter says whether the script should exit after outputting
the other parameters.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Mar 6 '07 #11
Toby A Inkster wrote:
Jerry Stuckle wrote:
>I agree, Tony.

Jerry, surely we've been posting in the same groups for long enough by now
for you to have learnt how to spell my name?
>echo statements work quite well.

function debug_them ()
{
for ( $i=1 ; $i<func_num_arg s() ; $i++ )
{
$val = func_get_arg($i );
if (is_array($val) )
print_r($val);
else
print $val;
print "\n----\n";
}
if (func_get_arg(0 )) exit();
}

usage:

debug_them(FALS E, $_SESSION, $some_array, $some_var);
debug_them(TRUE , $_POST);

The first parameter says whether the script should exit after outputting
the other parameters.
Sorry, Toby. Believe it or not - my spell checker "corrected" your name
and I missed it. I've now added your name to the dictionary so it
doesn't happen again :-)

And yes, I use something similar, except I use a class with static
functions and a static variable. If the variable is true it prints the
info.

That way I can say something like:

Debug::setFlag( true);
Debug::dump($va r);
Debug::print_r( $array);

Turn things on and off with the setFlag member. And a file quick search
on Debug:: will find the references to delete them. Or I can just
create a dummy debug class which does nothing (and therefore has very
little overhead).

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Mar 6 '07 #12
Mike Russell wrote:
If you work well without a debugger, more power to you. IDE's and debug
environments are used by skilled professionals all the time, and I hope you
will forgive me if I suggest that, as experienced and productive as you are,
you would be even more productive with a *good* debug environment.
I do always try new IDEs and whizzy development tools as I become aware of
them -- Eclipse, Screem, etc -- but none have ever seemed to really help
me in any way. I'm sure if I stuck at them, then I might reap some
long-term reward, but I don't really want to invest the time unless I can
get *something*, maybe just a *little* advantage, straight away. They need
to offer me a carrot.

A decent editor with syntax highlighting is my main tool. If I mistype
something, which I am wont to do, then it will be a different colour than
that which I was expecting, so I'll spot it pretty damn quickly. Having a
locally installed server is a godsend too. And I do virtually all my file
management at the command line. Very simple tools that don't get in my
way, and don't do things unless I tell them to do so. And my comparatively
recent (about 2 months ago) discovery of phpDoc is proving very helpful
too. I've always commented my code fairly well, but phpDoc provides me
with a rigorous framework for documenting PHP files, and gives me an
instant reward (the generated, and very readable documentation).

Different working patterns work for different people -- that's the way I've
found works best for me.

As an aside, as I'm mentioning text editors: I use various combinations of
Nedit, SciTE, Nano and TextWrangler depending on which OS I'm using at the
time, and what sort of edit it's likely to be.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Mar 6 '07 #13

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

Similar topics

21
2808
by: Applebrownbetty | last post by:
Hi, I've run into a problem with IE 6 vs. Mozilla when displaying a completely CSS positioned page, and was wondering if any resident CSS guru might quickly be able to find the problem(s). Thank you. In IE, the page looks how I want it to look (picture below): www.sunbadgeco.com/sunmetal/ie.jpg In Mozilla Firefox, somehow it's not quite right (pic below): www.sunbadgeco.com/sunmetal/mozillafirefox.jpg
0
1698
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web browser that Hotmail does not support. If you continue to use your current browser software we cannot guarantee that Hotmail will work correctly for you". Please help, this is very annoying. I have been searching for help on
4
3518
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this Fixpack on a test machine running ESE but encountered a serious error during the install. It started 'copying new files' but then stopped cold and displayed a dialog box asking me to "Please insert disk 1". (It all fit on one CD!) I clicked OK...
23
3269
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
2
1388
by: Carlo, MCP | last post by:
Hi, Sorry for posting twice, but I hope in your comprehension. Please help me! I'm troubling from months with a serious serialization problem that I'm not able to solve. I try to describe as simply as I can. 1) I have a class tha does something with colors. All default values are obviously NOT serializad. Instead, they are serialized when they are
1
9634
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
1
1639
by: funfair | last post by:
HI,EVERY ONE first problem, i have create a database in access 2003 it worked fine untill i have format my laptop . now im working on office 2003 on windows xp and i have norton 2006 but im facing a problem in opening some forms from command button a message appear the openform action was canceled and when i open them from the database window(form) there are problem in open event or change event or activate event the same file is work...
1
1602
by: oldgent | last post by:
I am having a problem installing the starter kits. I have reinstalled VS 2005, think that might be the problem. I then installed both 'Personal Website" and the "Club Website" starter kits. I still have the same problem. Any web starter kit that is installed under 'My Templates" does not allow you to enter the location directory or use the browse button. Neither the "Personal Website" or the "Club Website" allows you to select the...
1
54514
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and we instruct our experts to ignore any such PMs completely Be sure to give the version of Access that you are working with and the Platform and OS if applicable.
2
3523
by: violeta123 | last post by:
I am stuck! Please help It might be difficult to explain the problem via email, but I will try. I have a Win 2003 Enterprise server running with the only purpose of a membership web site that uses SQL server 2000 database. I had the site for over 5 years, but the problem started about 6 months ago. At random times (at least I have not found yet any particular time or event when it happens), the Web site Times-out and so the SQL server....
0
8685
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
9171
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
8880
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...
1
6532
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
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.