Search found 6 matches

by cardine
Thu May 26, 2005 8:40 pm
Forum: PHP - Code
Topic: Importing and Exporting Variables
Replies: 11
Views: 596

fopen(), fread(), fwrite(), fclose()
or if you have php 5, file_get_contents() and file_put_contents()
How do you use these variables to convert the .txt file into a variable (and back again)?
by cardine
Thu May 26, 2005 6:51 pm
Forum: PHP - Code
Topic: Importing and Exporting Variables
Replies: 11
Views: 596

No, what I'm trying to do is this: They user will type in their first name and e-mail. Then when they hit sign-up the confirmation page will display a username/password set. So using the code above it'll just go through a list of usernames and passwords I've already hard coded, and then it'll pick t...
by cardine
Thu May 26, 2005 6:14 pm
Forum: PHP - Code
Topic: Importing and Exporting Variables
Replies: 11
Views: 596

Note, I've changed the username's and passwords to x's for security reasons. (Also I haven't added the break tags in yet). <?php if ($variable == 1) { print "Username xxxx Password xxxxxxx"; $variable = $variable + 1; } else { } if ($variable == 2) { print "Username xxxx Password xxxx...
by cardine
Thu May 26, 2005 4:38 pm
Forum: PHP - Code
Topic: Importing and Exporting Variables
Replies: 11
Views: 596

The file will start out just containing a 1. Then hopefully (if the rest of my code works how it should) I want the file to be 2. Then next time somebody loads up the page it'll run through procedures and then the file will have a value of 3. So it is one # that after each runthrough will go up by 1...
by cardine
Thu May 26, 2005 4:34 pm
Forum: PHP - Code
Topic: Importing and Exporting Variables
Replies: 11
Views: 596

The text file are only numerical values (an integer variable).
by cardine
Thu May 26, 2005 4:17 pm
Forum: PHP - Code
Topic: Importing and Exporting Variables
Replies: 11
Views: 596

Importing and Exporting Variables

I know a bit of php (really I've code off of tutorials), but I'm stumped on this. Is there a code that takes a text file that is uploaded onto your website, and extracts a number from it (and turns it into a variable). Then at the end of the code write over the original text file with the variable's...