NYCPHP Meetup

NYPHP.org

[nycphp-talk] Help Request

Hans Zaunere zaunere at yahoo.com
Mon May 20 11:40:11 EDT 2002


> the values of the variables are not passing from the
> second
> to the third script, i wonder if my browser is screwing me up... I
> have
> netscape 4.5 that i am running....I will try $HTTP_POST_VARS[xxx] and
> see if i can pick up the values in the array when the second script
> is submitted.

Of course a handy function here is phpinfo(); 

However, keep in mind the globalicity (ie, if you're in a function). 
var_dump($HTTP_POST_VARS); and print_r($HTTP_POST_VARS);  are great
too, when phpinfo(); is overkill.

> Thanks Hans for your help on all this and on getting me
> onto
> the forum where i can get assistance.  Jerry

My pleasure,

Hans Z.


> 
> Hans Zaunere wrote:
> > 
> > <paralist>This message contained 1 file(s) and is available at
> http://nyphp.org/list/paralist_archive.html?L_mid=128</paralist>
> > 
> > There could be any number of problems, however I would start by
> looking
> > at the SQL that actually gets generated and try to clean things up
> a
> > bit.  Although this maybe not be helpful at all, I've attached a
> file
> > with some formatting/etc you may want to consider.
> > 
> > I personally dispise the "or die()" scheme (too Perly) so I've used
> > if() statements.  The real important things to consider is 1) I
> always
> > like to supply what connection handle I want to deal with -
> otherwise
> > things can get confusing if you have multiple database handles.  2)
> the
> > key for large SQL statements is to print it out and examine it if
> you
> > have problems.
> > 
> > Of course you may not need so many mysql_escape_string() calls,
> > depending on the data source, and you'll have to check that your
> column
> > types are all agreeable, DB perms, etc.
> > 
> > Hope this helps,
> > 
> > Hans Z.
> > 
> > <?php
> > 
> > if( $var2 == 'Return To Admin Home Page') {
> >    header('Location: index.htm');
> >    exit;
> > 
> > > <?php
> > > If ($var2=="Return To Admin Home Page"){
> > >         header("Location:index.htm");
> > >         exit;
> > > }elseif ($var1=="Modify Database"){
> > >
> > >                 $connection = mysql_connect("localhost", "jwing",
> > > "xxxxxxxx")
> > >                         or die ("Couldn't connect to server.");
> > >
> > >
> > >                 $db = mysql_select_db("jwing", $connection)
> > >                         or die ("Couldn't select database.");
> > >
> > > $sql = "update jobs
> > > set
> > > KEYWORD1 = \\"$keyword1\\",
> > > KEYWORD2 = \\"$keyword2\\",
> > > KEYWORD3 = \\"$keyword3\\",
> > > KEYWORD4 = \\"$keyword4\\",
> > > KEYWORD5 = \\"$keyword5\\",
> > > COMP_ID = \\"$comp_id\\",
> > > SHOW_DATE = \\"$show_date\\",
> > > JOB_CAT = \\"$job_cat\\",
> > > JOB_LOC = \\"$job_loc\\",
> > > JOB_TITLE = \\"$job_title\\",
> > > JOB_DESC = \\"$job_desc\\",
> > > JOB_SALARY = \\"$job_salary\\",
> > > FIRST_NAME = \\"$first_name\\",
> > > LAST_NAME = \\"$last_name\\",
> > > AD_EMAIL = \\"$ad_email\\",
> > > CNTCT_EMAIL = \\"$cntct_email\\",
> > > USR_NAME = \\"$usr_name\\",
> > > P_WORD = \\"$p_word\\",
> > > AD_PHONE = \\"$ad_phone\\",
> > > CNTCT_PHONE = \\"$cntct_phone\\",
> > > AD_FAXPHONE = \\"$ad_faxphone\\",
> > > WEB_SITE = \\"$web_site\\",
> > > CCNAME = \\"$ccname\\",
> > > CCNUMBER = \\"$ccnumber\\",
> > > MONTHEXP = \\"$monthexp\\",
> > > YEAREXP = \\"$yearexp\\",
> > > CCTYPE = \\"$cctype\\",
> > > STREET1A = \\"$street1A\\",
> > > STREET2A = \\"$street2A\\",
> > > STREET3A = \\"$street3A\\",
> > > CC_CITY = \\"$cc_city\\",
> > > CC_STATE = \\"$cc_state\\",
> > > CC_ZIP = \\"$cc_zip\\",
> > > TRBLFONE = \\"$trblfone\\"
> > > where job_id = \\"$job_id\\"";
> > >
> > > $sql_result = mysql_query($sql) or die (mysql_error());
> > > echo "
> > > <HTML>
> > > <HEAD>
> > > <TITLE></TITLE>
> > > </HEAD>
> > > <BODY background=\\"rimmabg.jpg\\">
> > > <FORM METHOD=\\"POST\\" ACTION=\\"jl2s1s.php\\">
> > >
> > > <input name=\\"var1\\" value=\\"Return To Admin Home Page\\"
> > > Type=\\"submit\\">
> > >
> > > </form>
> > > </BODY>
> > > </HTML>
> > > ";
> > > };
> > > ?>
> > >
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



More information about the talk mailing list