php-windows Digest 19 Mar 2003 06:43:00 -0000 Issue 1641

Topics (messages 19044 through 19056):

Re: multiple selections and checkboxes
        19044 by: Jill.Ramonsky.Aculab.com

Re: RE:[newbie]session problem
        19045 by: Bobby Rahman

Excel Spreadsheet as a datasource
        19046 by: Herhuth, Ron
        19047 by: Veselina Jecheva
        19048 by: Chris Kranz
        19049 by: Erwan Pianezza
        19050 by: WageMage

software for Linux
        19051 by: Afan Pasalic

Re: PHP 4.3.1 and Curl
        19052 by: Robert Smith

Re:Subject: multiple selections and checkboxes
        19053 by: Neil Smith
        19054 by: Matt Hillebrand
        19055 by: cpdm.efn.org
        19056 by: toby z

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 ---
Sure thing.

    <INPUT TYPE='CHECKBOX' ....>

should change to

    <INPUT TYPE='CHECKBOX' CHECKED ....>

wherever you want the checkbox to have a tick in it. Similarly

    <OPTION VALUE=....>

should change to 

    <OPTION SELECTED VALUE=....>

if you want it to be selected.

Jill

-----Original Message-----
From: toby z [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 9:51 AM
To: php hlp list
Subject: [PHP-WIN] multiple selections and checkboxes

                
                echo ("<input type='checkbox' name=rq_qlf value=$qlf_id>
&nbsp;&nbsp; $qlf_nme
                &nbsp; <br>
                ");

                //echo($skll_id.$sq);           
         
        }

--- End Message ---
--- Begin Message ---
Hiya


Futher investigation has lead me to some strange results. I checked phpinfo() and made sure "register global variables is set=on".

I then used:

//In db api
$num_results =mysql_num_rows($db_result);
$_SESSION['num_results'] = $num_results;

//In second file
session_start();
require_once("db_api.php");
echo "THE num_result from db API is ".$_SESSION['num_results'];

This seems to work....

when I try and use register_session() such as:

//In db api
$db_result = mysql_query($querystring);
$num_results =mysql_num_rows($db_result);
session_register("num_results");

//In second file
if (session_is_registered("num_results"))
echo "NUM RESULTS is $num_results";


I dont seem to get a value echoed. Not sure why?


But hopefully $_SESSION will work now...thanks for all your help
Toby and Janet -much appreciated :)











From: toby z <[EMAIL PROTECTED]>
To: Bobby Rahman <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] RE:[newbie]session problem Date: Tue, 18 Mar 2003 09:05:56 +0000 (GMT)


hi
try this

initiate session on proc.php
// init sessn
session_start();

// register session variblez ! ! ! !
session_register("SESSN");




chech for session set on sum_page.php


<?php
// sessn chk ! ! ! !
session_start();
if(!session_is_registered("SESSN"))
{
// sessn chk failed .... invoke error hndlr ! ! ! !
header("Location: /nologn.php");
exit();
}



the rest of ur code .....

?>


hope thid helps


good luck

toby ....


--- Bobby Rahman <[EMAIL PROTECTED]> wrote: > > > Hiya, > > Im running php4.2.3 on Win98 and apache 2.0.43. > I am having troubles passing variables from page to page. > I try to use: > > session_start(); > session_register("test"); > > > when echo $test on a different page it seems to be empty > when not called from within the page originally created. > > I have session_start() on every page at the start just under the > php syntax > <? and also register the variables which I want global. > > I have edited the php.ini to set the session.save_path = > "C:/windows/temp" > and also have global variables set on > > > Any suggestions to what it may be as it doesnt seem to produce any > errors. > > > Thanks > > _________________________________________________________________ > Express yourself with cool emoticons http://messenger.msn.co.uk > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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



_________________________________________________________________
MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk


--- End Message ---
--- Begin Message ---
Has anyone successfully used an Excel spreadsheet as a datasource?  I realize that it 
is a flimsy datasource but I have a need to quickly and dynamically take the 
information stored in spreadsheets and manipulate the data and write them to a SQL 
database.

I would be grateful for any assistance or information on how to do this.

Thanks,
Ron


--- End Message ---
--- Begin Message ---
Hello, Ron, 
I tried the same a couple of months ago, but received a message like
"Cannot find the table in datasource". Obviously the ODBC driver in
Win98/2000 couldn't find the sheet and resolve it as a table.
Regards, Veselina

At 08:57 3/18/03 -0500, Herhuth, Ron wrote:
>
>Has anyone successfully used an Excel spreadsheet as a datasource?  I
realize that it is a flimsy datasource but I have a need to quickly and
dynamically take the information stored in spreadsheets and manipulate the
data and write them to a SQL database.
>
>I would be grateful for any assistance or information on how to do this.
>
>Thanks,
>Ron
>
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
I've used COM objects to write to Excel spreadsheets and had no-end of
problems. But never tried reading from it, well, did minimal reading to
find the next blank cell, so I guess it would be much the same. It's
pretty simple stuff using the COM object to access it tho.

chris kranz
fatcuban.com
 


-----Original Message-----
From: Herhuth, Ron [mailto:[EMAIL PROTECTED] 
Sent: 18 March 2003 13:57
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Excel Spreadsheet as a datasource



Has anyone successfully used an Excel spreadsheet as a datasource?  I
realize that it is a flimsy datasource but I have a need to quickly and
dynamically take the information stored in spreadsheets and manipulate
the data and write them to a SQL database.

I would be grateful for any assistance or information on how to do this.

Thanks,
Ron


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





--- End Message ---
--- Begin Message ---
Hi there is commercial product out there if your company can afford it it is
quite nice : http://www.zakkis.ca/products/abc_lightparser/index.php

Erwan

----- Original Message -----
From: "Herhuth, Ron" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 2:57 PM
Subject: [PHP-WIN] Excel Spreadsheet as a datasource



Has anyone successfully used an Excel spreadsheet as a datasource?  I
realize that it is a flimsy datasource but I have a need to quickly and
dynamically take the information stored in spreadsheets and manipulate the
data and write them to a SQL database.

I would be grateful for any assistance or information on how to do this.

Thanks,
Ron


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




--- End Message ---
--- Begin Message --- I hope I won't be stoned or burnt at the stake for suggesting this... but there are several rather nice example on how to do this in ASP... I suggest you look them up (in sites such as asp101.com or 4guysfromrolla.com) and reverse-engineer them to work in php (using the same methodology and objects, yet a different and far superior language to manipulate them).

HTH, HAND

WageMage
Programmer at arms

Herhuth, Ron wrote:

Has anyone successfully used an Excel spreadsheet as a datasource? I realize that it is a flimsy datasource but I have a need to quickly and dynamically take the information stored in spreadsheets and manipulate the data and write them to a SQL database.

I would be grateful for any assistance or information on how to do this.

Thanks,
Ron







--- End Message ---
--- Begin Message --- Hi guys,
I'm moving from Windows (HomeSite, CuteFTP, Mascon, OutlookExpress...) to Linux and need recommendation for software to use - for easy use of PHP like I had in HomeSite. Some of friends recommended CoffeeCup HTML Editor. Switching to Eudora...


Thanks for any help!

Afan


--- End Message ---
--- Begin Message ---
Well after after banging my head a little bit the answer fell out.  With the
newer versions of curl, it seems that you have to use the ca-bundle.crt file
for curl to be able to verify certificates.  I had to put the following
statement into my scripts.

curl_setopt($ch, CURLOPT_CAINFO, 'drive:\pathto\ca-bundle.crt');

Still have to modify all my scripts that are using curl, but I feel that it
is better than setting it to not verify.

Robert



"Robert Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> More information on below.  I added the Curl_Verbose statement to my test
> script and this is what it displayed.
>
>  SSL: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
> verify failed* Closing connection #0
>
>
> "Robert Smith" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Windows 2000
> > IIS 5
> >
> > I recently upgraded to php 4.3.1 from 4.2.  Curl was working before the
> > upgrade.  I do have the curl extension uncommented in php.ini. php_info
> says
> > that curl is enabled.  I wrote a simple script to test curl.
> >
> > <?
> >     print("Hello World");
> >     error_reporting(E_ALL);
> >     $ch = curl_init();
> >     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> >     curl_setopt($ch, CURLOPT_URL "any https site");
> >     $response curl_exec ($ch);
> >     curl_close($ch);
> >     print($response);
> >     print("GoodBye");
> > ?>
> >
> > I do not get any errors when I run the script.  Simply a blank page with
> my
> > print statement.  I put the print statements in to make sure the script
> was
> > running all the way through.  It will display any page that is not
https.
> I
> > can also insert CURLOPT_SSL_VERIFYPEER, 0 and it will pull up https
site.
> I
> > am tring to avoid having to use this statement because it would take
some
> > time to go back and add this to all our shopping carts that are using
> curl.
> >
> > Thanks for any input
> >
> > Robert Smith
> >
> >
>
>



--- End Message ---
--- Begin Message --- Hi Toby - I can't actually fllw yr frm cs t hs n vwls n t !

However, I notice you are not closing the </option> tag. Maybe that would help ?
AFAIK, HTML requires <option> tags to be close.


HTH - My 2c

Cheers,
Neil Smith.

At 09:51 18/03/2003 +0000, you wrote:
/*      echo("<select id=qlf_opt name=rq_qlf width='15'
style=\"font-family: $font\" multiple>

<optgroup label=select qualifications> ");


for ($count = 1; $qlfz_id = mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme = mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr) { $qlf_id = $qlfz_id[1]; $qlf_nme = $qlfz_id[0]; $sq = $qlfz_id[2];

echo ("<option value=$qlf_id>$qlf_nme");

//echo($skll_id.$sq);

}

echo("</optgroup>
        </select>


--- End Message ---
--- Begin Message ---
No, that's XHTML that requires all tags to be closed.

-----Original Message-----
From: Neil Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 3:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re:Subject: multiple selections and checkboxes


Hi Toby - I can't actually fllw yr frm cs t hs n vwls n t !

However, I notice you are not closing the </option> tag. Maybe that
would 
help ?
AFAIK, HTML requires <option> tags to be close.

HTH - My 2c

Cheers,
Neil Smith.

At 09:51 18/03/2003 +0000, you wrote:
>/*      echo("<select id=qlf_opt name=rq_qlf width='15'
>style=\"font-family: $font\" multiple>
>
>         <optgroup label=select qualifications> ");
>
>
>for ($count = 1; $qlfz_id = 
>mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme =

>mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr)
>         {
>                 $qlf_id = $qlfz_id[1];
>                 $qlf_nme = $qlfz_id[0];
>                 $sq = $qlfz_id[2];
>
>                 echo ("<option value=$qlf_id>$qlf_nme");
>
>                 //echo($skll_id.$sq);
>
>         }
>
>echo("</optgroup>
>         </select>


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





--- End Message ---
--- Begin Message ---
Also if you name your <select> with array notation:

    echo("<select id=qlf_opt name="rq_qlf[]" width='15' 

You will end up with an array of the selected values.

example: 
<?
// example of multiple select boxes and php arrays 

if (count($array_select) > 0) {
        ?><pre><?print_r($array_select)?></pre><?
} else {
        ?>
        <form name="blah" action="">
        <select name="array_select[]" multiple>
                <option value="one">one</option>
                <option value="two">two</option>
                <option value="three">three</option>
        </select>
        <input type="submit">
        </form>
        <?
}
?>


--Christopher


Quoting Neil Smith <[EMAIL PROTECTED]>:

> Hi Toby - I can't actually fllw yr frm cs t hs n vwls n t !
> 
> However, I notice you are not closing the </option> tag. Maybe that would 
> help ?
> AFAIK, HTML requires <option> tags to be close.
> 
> HTH - My 2c
> 
> Cheers,
> Neil Smith.
> 
> At 09:51 18/03/2003 +0000, you wrote:
> >/*      echo("<select id=qlf_opt name=rq_qlf width='15'
> >style=\"font-family: $font\" multiple>
> >
> >         <optgroup label=select qualifications> ");
> >
> >
> >for ($count = 1; $qlfz_id =
> >mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme
> >= mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr)
> >         {
> >                 $qlf_id = $qlfz_id[1];
> >                 $qlf_nme = $qlfz_id[0];
> >                 $sq = $qlfz_id[2];
> >
> >                 echo ("<option value=$qlf_id>$qlf_nme");
> >
> >                 //echo($skll_id.$sq);
> >
> >         }
> >
> >echo("</optgroup>
> >         </select>
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 




------------------------------------------------------------
Visit http://www.efn.org for all your community networking needs

--- End Message ---
--- Begin Message ---
thnx a mill guyz for ur replys

but im still stuck

nuthing seem to be working n im closing-in on my ded line

id be eterrnally gratefull if anyone could suggess an alternative to
allow multi-selection of values fetched from the db

the only prob is the values are aorund 40 outta which a user has to
select as many as he likes n i HAVE to fetch them all from the db


guyz hlp plz
thnx a mill

doomed .....
toby

 --- Neil Smith <[EMAIL PROTECTED]> wrote: > Hi Toby - I
can't actually fllw yr frm cs t hs n vwls n t !
> 
> However, I notice you are not closing the </option> tag. Maybe that
> would 
> help ?
> AFAIK, HTML requires <option> tags to be close.
> 
> HTH - My 2c
> 
> Cheers,
> Neil Smith.
> 
> At 09:51 18/03/2003 +0000, you wrote:
> >/*      echo("<select id=qlf_opt name=rq_qlf width='15'
> >style=\"font-family: $font\" multiple>
> >
> >         <optgroup label=select qualifications> ");
> >
> >
> >for ($count = 1; $qlfz_id =
> >mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//,
> $fmly_nme
> >= mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr)
> >         {
> >                 $qlf_id = $qlfz_id[1];
> >                 $qlf_nme = $qlfz_id[0];
> >                 $sq = $qlfz_id[2];
> >
> >                 echo ("<option value=$qlf_id>$qlf_nme");
> >
> >                 //echo($skll_id.$sq);
> >
> >         }
> >
> >echo("</optgroup>
> >         </select>
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--- End Message ---

Reply via email to