php-general Digest 24 Apr 2005 15:27:08 -0000 Issue 3416

Topics (messages 213747 through 213758):

help for me about session
        213747 by: Josephson Tracy
        213748 by: Steve Buehler
        213749 by: Pedro Luis Cruz Riguetti

Re:Re: [PHP] help for me about session
        213750 by: Josephson Tracy
        213757 by: Steve Buehler
        213758 by: Josephson Tracy

Re: Dynamic Generating reports to print
        213751 by: Dan Rossi

Re: reverse MD5 ???
        213752 by: D. Wokan

Re: MSSqlServer table/field information
        213753 by: D. Wokan

Re: image maps in PHP
        213754 by: Dasmeet Singh

Re: Error Handler
        213755 by: Pinoy Ako

>From form to db question
        213756 by: William Stokes

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
hi everyone,
when i study php, i have a problem as following:
---------------------
file1.php 






 


-------------------------
but when the 2ed access the file1.php
the value of $NextCourse is the $NextCourse in the , Not the value of document.form1.NextCourse.value.

could someone tell me why?thanks


�����ʼ��������ȶ�����ȫ�ɿ�����
����Ϊ�㵲ס�����ʼ���

--- End Message ---
--- Begin Message ---
At 09:35 PM 4/23/2005, Josephson Tracy wrote:


hi everyone,
when i study php, i have a problem as following:
---------------------
file1.php
<?
if($NextCourse == 1){ do something;}
else($NextCourse ==""){do something other }
?>
-------------------------
but when the 2ed access the file1.php
the value of $NextCourse is the $NextCourse in the <? and ?>, Not the value of document.form1.NextCourse.value.


could someone tell me why?thanks

I believe it should be: <? if($NextCourse == 1){ do something; } elseif(!$NextCourse){ do something other; } <?

By the way you have your statement, I think you are only looking for the "1". You might try the following instead.
<?
if($NextCourse == 1){
do something;
}else{
do something else;
}
?>

--- End Message ---
--- Begin Message ---
-- mierda carajo saquenme de sta lista de mierda q llema mi correo de huevadas
rapido carjo.nierdas






---------------------------------------------------------------
Banco de Cr�dito BCP - Dedicados a hacerte la Banca m�s simple.
Visita nuestra Banca por Internet http://www.viabcp.com
---------------------------------------------------------------

--- End Message ---
--- Begin Message ---
-----  Original Message  -----
From: Steve Buehler 
To: Josephson Tracy ;php-mailing-lists 
Subject: Re: [PHP] help for me about session
Sent: Sun Apr 24 10:54:34 CST 2005

> At 09:35 PM 4/23/2005, Josephson Tracy wrote:
> 
> 
> >hi everyone,
> >when i study php, i have a problem as following:
> >---------------------
> >file1.php
> > >if($NextCourse == 1){ do something;}
> >else($NextCourse ==""){do something other }
> >?>
> >-------------------------
> >but when the 2ed access the file1.php
> >the value of $NextCourse is the $NextCourse in the , Not the 
> >value of document.form1.NextCourse.value.
> >
> >could someone tell me why?thanks
> 
> I believe it should be:
>  if($NextCourse == 1){ do something; }
> elseif(!$NextCourse){ do something other; }
>  
> By the way you have your statement, I think you are only looking for the 
> "1".  You might try the following instead.
>  if($NextCourse == 1){
>          do something;
> }else{
>          do something else;
> }
> ?>
> 
ok. the key problem is when I click the button to submit. 
the value of $NextCourse is not  the value of value
 of document.form1.NextCourse.value.
just is the pre page's $NextCourse,that's say "null";
how can i get document.form1.NextCourse.value?


????????????????
???????????

--- End Message ---
--- Begin Message --- At 10:29 PM 4/23/2005, Josephson Tracy wrote:
> At 09:35 PM 4/23/2005, Josephson Tracy wrote:
> >hi everyone,
> >when i study php, i have a problem as following:
> >---------------------
> >file1.php
> ><?
> >if($NextCourse == 1){ do something;}
> >else($NextCourse ==""){do something other }
> >?>
> >-------------------------
> >but when the 2ed access the file1.php
> >the value of $NextCourse is the $NextCourse in the <? and ?>, Not the
> >value of document.form1.NextCourse.value.
> >
> >could someone tell me why?thanks
>
> I believe it should be:
> <?
> if($NextCourse == 1){ do something; }
> elseif(!$NextCourse){ do something other; }
> <?
>
> By the way you have your statement, I think you are only looking for the
> "1".  You might try the following instead.
> <?
> if($NextCourse == 1){
>          do something;
> }else{
>          do something else;
> }
> ?>
>
ok. the key problem is when I click the button to submit.
the value of $NextCourse is not  the value of value
 of document.form1.NextCourse.value.
just is the pre page's $NextCourse,that's say "null";
how can i get document.form1.NextCourse.value?

How are you passing the variable $NextCourse to this script?

--- End Message ---
--- Begin Message ---
I want to get the value of document.form1.NextCourse.value
But I got the  value of $NextCourse in last page.

Steve Buehler <[EMAIL PROTECTED]> wrote:

At 10:29 PM 4/23/2005, Josephson Tracy wrote:
> > At 09:35 PM 4/23/2005, Josephson Tracy wrote:
> > >hi everyone,
> > >when i study php, i have a problem as following:
> > >---------------------
> > >file1.php
> > >> > >if($NextCourse == 1){ do something;}
> > >else($NextCourse ==""){do something other }
> > >?>
> > >-------------------------
> > >but when the 2ed access the file1.php
> > >the value of $NextCourse is the $NextCourse in the , Not the
> > >value of document.form1.NextCourse.value.
> > >
> > >could someone tell me why?thanks
> >
> > I believe it should be:
> > > > if($NextCourse == 1){ do something; }
> > elseif(!$NextCourse){ do something other; }
> > > >
> > By the way you have your statement, I think you are only looking for the
> > "1". You might try the following instead.
> > > > if($NextCourse == 1){
> > do something;
> > }else{
> > do something else;
> > }
> > ?>
> >
>ok. the key problem is when I click the button to submit.
>the value of $NextCourse is not the value of value
> of document.form1.NextCourse.value.
>just is the pre page's $NextCourse,that's say "null";
>how can i get document.form1.NextCourse.value?

How are you passing the variable $NextCourse to this script?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--- End Message ---
--- Begin Message ---
On 24/04/2005, at 12:43 AM, Steve Brown wrote:


I used to encounter the same problems with reporting in our business software. You can generate reports and spit out HTML in a new window and have the user print the report from the browser, but that has many drawbacks. It only works with simple data sets, its difficult (or impossible) to control page breaks, lack of precision placing, etc.

Now I use FPDF to generate PDF reports (http://www.fpdf.org/).  Its
free, easy to use, and pretty flexible.  It allows you to do precision
placement on a page, add headers, footers, etc, etc, etc.  Be sure to
check out the "Scripts" section, its got a bunch of useful tips for
expanding functionality of the classes.  There is another commerical
product out there (can't thin of the name right now) that is supposed
to be faster, but FPDF is pretty fast in our applications.


I find doing it this way a total pain in the ass, I have in the past used htmldoc , to generate html to pdf , it has special tags to do certain things in the pdf's. Seriously drawing it like this is time consuming. I would suggest report designers like report manager and jasper reports. Currently for Excel I have built a subclass to the PEAr structures datagrid which uses the excel spreadsheet renderer, and i give it a database resultset, currently the dataobject, and then it will generate the columns dynamically from the query. I have given it extra methods to display extra stuff in the header and footer ie for formulas , and special formatting on the cells. But pdf's are nice if the user doesnt need to collate the data just print it.

The funky thing with Jasper reports is, you can maniuplate the xml based files, say build a web frontend to build a report builder, so the user doesnt need to use gui tools like iReport to create report templates. So you let them select the fields you want, and u do the sql and xml generating in the backend. To do it currently, the fields have to be statically setup , it also however requires a Jsp to run a servlet to compile the reports. Reportman however runs a cgi report server, but cant do excel on unix.


I also use the JPGraph package for generating graphs (http://www.aditus.nu/jpgraph/). This is *really* slick. Its free for personal use, about $125 for commercial use. You need to install some additional PHP libraries (JPEG, PNG, GD at least), but its fast and easy. I love playing around with this product because the possibilities for what you can do are almost endless.



This is really sweet however it doesnt have PHP5 support ?
--- End Message ---
--- Begin Message ---
William Stokes wrote:

Hello,

I have a system that uses certain id info. This info is stored in a session cookie in MD5 format. At certain parts of the code I need to update or insert to MySQL DB with that id info value in cleartext. Is this possible?

If so, how to put this to a sql query?

$sqlquery = "insert into x_table (team_id,number,) values ('$team_id','$number')

$team_id is the MD5 formatted cookie value and I need to put it to the x_table column team_id in cleartext.

Thanks a lot
-Will


MD5 values are hashes, not encryptions. There's nothing to "decrypt". It's good for storing the results of some value and than when the person sends the MD5 back at a later point you can make sure it still matches the desired value by re-hashing the original value again.
--- End Message ---
--- Begin Message ---
Chris Boget wrote:

Is there a way to programatically get information about a specific table and/or field? And also any constraints that a field has?

thnx,
Chris



sp_help @objname='{tablename}'

This will actually return several recordsets which are probably available individually in the other responses I've seen to this message. I just wanted to make the list of options more complete.
--- End Message ---
--- Begin Message --- John Coppens wrote:
On Fri, 22 Apr 2005 19:11:23 +0530
[EMAIL PROTECTED] (Dasmeet Singh) wrote:


Actually I am not able to make image maps because of uneven state boundaries..

Can you please suggest some tools... I haven't used any yet...


Did you check GIMP? It has an option to make HTML image maps. Check Filters|Web|ImageMap

John


Thanks

-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/


Mike wrote:

Hi!
I need to create an image map on a country map, where people can click on any state and get some info related to it.. In such case the regular polygon/circle/rectengle image map wont do bcoz of shapes of state..


I guess this must be possible someway in PHP.. please tell me if you have any idea how to go abt this..


Is the problem you're experiencing that the image map isn't being built properly or are you passing information to it that does not appear to be consistant.

If it's the former, then PHP has nothing to do with that. I'm sure
you can find some tools to generate image maps for you. There have
always been free ones with a minimum of effort.


If you're having problem with PHP in the mix, can you describe the PHP
problem, provide some code, some sample output, etc.?


I've used image maps in the past (though I try to stay away from
them) and you can create a link with virtually any polygon if you
have the patience to may out the plot points. You could easily create
a star with many, many points and have it be clickable - which would
indicate that most states would be a piece of cake.


-M

Thanks John, I never knew about any such thing in Gimp :)


SayOrange.com How to choose the best web hosting? http://www.sayorange.com

--- End Message ---
--- Begin Message ---
Noong 06:24 AM 4/23/2005, Ang sabi ni Richard Lynch...

Is an undefined function one of the examples? If not, try one of those.

I use the examples given in the example and it works but I'm not after errors inside a function. I'm trying to see, what if I forgot to create a function or what if I mistyped a function, then it should trigger a fatal error using the custom error handler.


Also, did you remember to call http://php.net/set_error_handler as well as
to define the function?

As I've said, I copied the sample given from the manual so here it is: $old_error_handler = set_error_handler("userErrorHandler");

No, I did not define the function because like I said, that's what I'm after. What if I mistyped a function or forgot to define a function or the file containing the function goes missing, etc.
--- End Message ---
--- Begin Message ---
Hello,

I writing a script that allows user to update a soccer league table with web 
form. I made a script that prints the old values to text fields in the form. 
It's done with a loop so that each text field name is numbered +1 higher 
than previous.

My problem is how to put the changed data back to the DB with a different 
loop since the variable names chance for every team.

Here's the a sample of the update part( only one column to update). This 
script gets 14 game and team values from form
like this; $new_games1,$new_games2,$new_games3,$new_games4 etc (and same for 
the $team).

$sql="SELECT name FROM x_series WHERE team_type = 'series'";
$result=mysql_query($sql);
$rounds = mysql_num_rows($result);
$count = 1;
while ($rounds >= $count) {

$sql = "UPDATE x_series SET games = '$new_games1' WHERE name = '$team1'";
mysql_query($sql);

$count++;
}

So how can get the game and team variables to change (+1) each time the sql 
query is fired? Or can I? Is the alternative to write 14 different sql 
queries? Sounds stupid.

Hope someone gets my idea and can help. I've been banging my head against 
the wall with this and I'm running out of fresh ideas. I really wouldn't 
want to write those separate sql queries for each update if its possible to 
avoid that. Thanks a lot.

-William 

--- End Message ---

Reply via email to