This is a discussion on "Fwrite to certain area on a page" within the PHP Forum section. This forum, and the thread "Fwrite to certain area on a page are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Fwrite to certain area on a page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Fwrite to certain area on a page
Here is my problem: I have a page called install.php that is just a user entry form. Each textfield is associated with a string on another page, variables.php. I want people to be able to type in a value in the text field and have that value fwrited to the value of the string on the other page. Is this possible?
|
|
|
|
#2
|
||||
|
||||
|
Re: Fwrite to certain area on a page
Can be done with classes like i said
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#3
|
|||
|
|||
|
Re: Fwrite to certain area on a page
I do have classes. I have it all set up to do this, but I am having a little problem with the strings actually executing before they are fwrited to the variables.php page.
Here is install.php (only the strings siteurl and password are being utilized) (variables.txt is a blank text file):
|
|
#4
|
||||
|
||||
|
Re: Fwrite to certain area on a page
could you not create a class called settings, like this:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#5
|
|||
|
|||
|
Re: Fwrite to certain area on a page
I got the thing working almost. Now the problem is that when I use the include code:
I am afraid that I will have to put the <?php and ?> in the variables.txt file for it to execute, but that would make things much more complicated since all the content from variables.txt is generated from the fwrite... Last edited by tox0tes; Aug 31st, 2007 at 19:57. |
|
#6
|
||||
|
||||
|
Re: Fwrite to certain area on a page
this file will contain the password to the cms..
and you gave the extension ext anyone can come along and view it and see the password
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#7
|
|||
|
|||
|
Re: Fwrite to certain area on a page
Nah nah nah... You need to escape the $ by using backslashes, cause echo "$var"; will echo the contents of the $var variable, and because $siteurl and $password are not set, it writes nullspace to the file...
Should look like this...
|
|
#8
|
|||
|
|||
|
Re: Fwrite to certain area on a page
okay afmanuk !
i works too :
|
|
#9
|
|||
|
|||
|
Re: Fwrite to certain area on a page
Quote:
As for the problem, I got it fixed by putting a $-variablename and then used string replace to take out the "-" before it is processed. This seemed to work. THanks for the help. |
|
#10
|
||||
|
||||
|
Re: Fwrite to certain area on a page
Quote:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Tags |
| php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fwrite with new line break problem? | meth8200 | PHP Forum | 2 | Feb 4th, 2008 15:23 |
| fopen, fwrite, fclose errors, really got me stuck! | simbo1231 | PHP Forum | 10 | Dec 8th, 2007 15:19 |
| 2+2 =? pic doesn't fit in defined area | rubyfruit | Web Page Design | 9 | Oct 18th, 2006 05:34 |
| Page Area | robukni | JavaScript Forum | 3 | Feb 5th, 2006 17:17 |