Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

PHP Array Storage

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

PHP Array Storage

Postby bonkers » Mon Jun 02, 2003 11:35 pm

How can I do this:

when the script is run, it stores the information it recieves in from the arguments in an array.

it encrypts the array.

it writes the array to a file.


When another script is run it does this:

reads the file,

unencrypts the array,

it displays the data.
bonkers
New php-forum User
New php-forum User
 
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Re: PHP Array Storage

Postby WiZARD » Tue Jun 03, 2003 2:39 am

> when the script is run, it stores the information it recieves in > from the arguments in an array.
$arr_var = array(vr_01 =>($var01), vr_02 =>($var02) etc);
$arr_var = array(vr_01, vr_02 etc);
see array in manual.....
http://www.php.net/array

> it encrypts the array.
for what?
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby mike » Tue Jun 03, 2003 3:04 am

You cannot encrypt an "array" only a "string". Check on manual what the difference is.
User avatar
mike
New php-forum User
New php-forum User
 
Posts: 73
Joined: Sun May 04, 2003 4:26 am
Location: Athens

Postby WiZARD » Tue Jun 03, 2003 5:13 am

mike wrote:You cannot encrypt an "array" only a "string". Check on manual what the difference is.

as i understand his want to create personall wasswd file :D
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby bonkers » Tue Jun 03, 2003 6:07 pm

No actually... I kinda wanted to do like this, it's for a posting thing.

text file as follows:
Code: Select all
poll 1 (wow)
-question 1: 60  //60 is the number of votes
-question 2: 50
-question 3: 134
-question 4: 214

poll2 (who)
-question 1: 13
-question 2: 1324234
-question 3: 1344
-question 4: 9834


This text file doesn't have to be encrypted, it's pretty much just for storing data from polls... they're not really questions but rather voting options.
bonkers
New php-forum User
New php-forum User
 
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron