php-general Digest 11 Nov 2009 15:15:08 -0000 Issue 6437

Topics (messages 299769 through 299772):

Re: Checkbox in PHP form
        299769 by: Adam Randall
        299770 by: Adam Randall

How to create CA certificate with PHP
        299771 by: Tanveer Chowdhury

Multiple file upload
        299772 by: Matthew Croud

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 ---
<INPUT class="text" id="myCheck1" type="checkbox"<?php echo( $row[33] ==
'no' ? ' checked="checked"' : '' ); ?> value="PFDs"
name="f_sequipment1"></b><font size="2">PFDs<b>
Or with short tags:

<INPUT class="text" id="myCheck1" type="checkbox"<?= $row[33] == 'no' ? '
checked="checked"' : '' ?> value="PFDs" name="f_sequipment1"></b><font
size="2">PFDs<b>
Adam.

On Sun, Nov 8, 2009 at 5:39 PM, Ernie Kemp <[email protected]> wrote:

>   Need some help here with checkboxes in an html form.
>
>
>
> My issue is I have a form that needs to be viewed with checkboxes filled in
> depending on the values in the table.
>
>
>
> I tried:
>
> <INPUT class=text id="myCheck1" type=checkbox <?php if ( $row[33] = 'no')
> { echo "checked=yes";  } else { echo '';  } ?> value="PFDs"
> name=f_sequipment1></b><font size="2">PFDs<b>
>
> but the checkbox field is always checked.
>
>
>
> I thought of JavaScript also but it would have to be a “if $row[33] then
> run a JavaScript function” .  This is not working for me neither.
>
>
>
> Sorry if this seems trivial but I need your help.
>
>
>
> Thanks in advance.....
>
>
>
>
>
>
>
>
>



-- 
Adam Randall
http://www.xaren.net
AIM: blitz574

--- End Message ---
--- Begin Message ---
On Sun, Nov 8, 2009 at 9:52 PM, Brian Hazelton <[email protected]> wrote:
> <input class=text id="myCheck1" type="checkbox" <?php if ( $row[33] ==
> 'no') { echo "checked="checked";  } ?> value="PFDs"
> name=f_sequipment1></b><font size="2">PFDs<b>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Adam Randall
http://www.xaren.net
AIM: blitz574

--- End Message ---
--- Begin Message ---
Hello all,

Using openssl, I can create CA certificate by using the linux command line.

But this thing I want to do using PHP that is I want to add some information
in the openldap regarding a user and also would like to insert his public
key certificate along with the other information.

Can you please suggest any link or documentation on this topic. For your
information I can insert information like user,email,phone,email in openldap
but haven't tried to insert the certificate in openldap yet. The issue is, I
want to make the whole process automated like all user information user will
input in a form and upon clicking submit button all those information along
with his certificate which will be generated then and there will be inserted
in openldap.

Thanks in advance.

--- End Message ---
--- Begin Message ---
Dear lords of PHP,

I have a working image upload script that meets all my needs,
My question is I need to upload multiple images using the same form,

This is the PHP part I have so far, largely taken from a book:
_________________________________________________________

$file_dir = "/public_html/uploads";
foreach($_FILES as $file_name => $file_array) {
        echo "path: ".$file_array["tmp_name"]."<br/>\n";
        echo "name: ".$file_array["name"]."<br/>\n";
        
        $UploadName = $file_array["name"];

        if (is_uploaded_file($file_array["tmp_name"])) {
move_uploaded_file($file_array["tmp_name"], "$file_dir/". $file_array["name"]) or die ("Couldn't copy");
                echo "file was moved!<br/>";
        }
}
_________________________________________________________

Lets say the HTML from that sends data to this script has 3 upload forms that get send to $_FILES, would I access the data by modifying the following line from the above example:
...
foreach($_FILES[' UPLOADIMAGE1 '] as $file_name => $file_array) {
...

...
foreach($_FILES[' UPLOADIMAGE2 '] as $file_name => $file_array) {
...

...
foreach($_FILES[' UPLOADIMAGE3 '] as $file_name => $file_array) {
...

Thanks for reading!
Matt Cheezoid

--- End Message ---

Reply via email to