[PHP] Subroutines
I've looked through the manual (or at least searched) for subroutines, and I can't find them, there's a guy I know who made a script with custom PHP subroutines. (http://b000.net/) Anyway, I want to know how to make them. Thanks for any input.
Re: [PHP] Subroutines
My bad, http://www.b000.net/code/ - Original Message - From: Chris Herring [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Sunday, September 30, 2001 1:07 AM Subject: [PHP] Subroutines I've looked through the manual (or at least searched) for subroutines, and I can't find them, there's a guy I know who made a script with custom PHP subroutines. (http://b000.net/) Anyway, I want to know how to make them. Thanks for any input. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WEB LOG
Oops, I looked through this too fast; I might have worked out what really needs to be done... if $pwd == $real_pwd { header (Location: http://actualdestinedsite;); } elsif { header (Location: http://evilsitethathasanerror;); } - Original Message - From: Ardani Sarjito [EMAIL PROTECTED] To: php_list [EMAIL PROTECTED] Sent: Sunday, September 23, 2001 9:35 PM Subject: [PHP] WEB LOG hi all! I'm just about to try to make my first weblog page. I find some problem. I want to make the user not being able to go to the destination page if the password does match. how do I do that? any help would be greatly appreciated. Thanks alot! Ardani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WEB LOG
OOPS, again, elseif isn't what needs to be done. Ok, here we go. if $pwd == $real_pwd { header (Location: http://therealsite;); } else { header (Location: http://badsite;); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] array
I'm trying to get an array to read the text from a file, and so far it isn't working. If you can help me, respond. snippet $fp = fopen (./file.txt, r); $text = array ($fp); sort ($text); reset ($text); while (list ($key, $val) = each ($text)) { echo [.$key.] .$val; echo br; } fclose ($fp); /snippet Currently all that does is print out [0] Resource id #1 Any help is GREATLY appreciated. Thanks in advance.
[PHP] IF statements
Ok, use your imaginations and visualize what I'm trying to do with this, because I'm not quite sure how to explain it. Anyway, I'm trying to have a script that says when THIS_VAR and THAT_VAR are a certain number it show something. I'm not quite sure how to do that without making yet another var that would screw up things even more. Anyway, this might help some people with what I'm trying to do: if ($date == 24 $hour == 3) { } But that doesn't work... Any help is appreciated -chris Fat people eat.
[PHP] UGH
This is really bugging me. I don't see any reason why it shouldn't work, yet it doesn't. ? $date = date (d); $math = 24 - $date; if ($date = 24); { echo FONT SIZE=4 FACE=ARIAL COLOR=#808080SCHOOL'S OUT FOR SUMMER!!! *guitar ballad*/font; } else { echo FONT SIZE=4 FACE=ARIAL COLOR=#808080Only $math days until school's out!!! w00p w00p!/font; } ? any help is appreciated
[PHP] backends
Anybody here make their own news scripts? If so would you mind giving me a download url or sending it to me? I would appreciate anything like that. Thanks. -chris
Re: [PHP] writing to file on server
unless that file you're writing to is on a different server, just put the relative location to the file. ie: ./guestbook.txt if this doesn't work I have nothing to offer you. :-\ - Original Message - From: Joeri Vankelst [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 22, 2001 7:43 AM Subject: [PHP] writing to file on server Hi, I've just started working with PHP. I've made a guest book using PHP (nothing spectacular) that worked just fine when I tested it op my pc, but when I uploaded it, it stopped working. My specific problem is that I cannot write to a file that already exists and contains data. When I try to I get these warnings: Warning: File already exists Warning: fopen(ftp:[EMAIL PROTECTED]/guestbook.txt,a;) - File exists Is this problem related to the FTP fopen? And is there a way to correct this problem? Tnx! Joeri Vankelst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie Help!! Please Look!
right up my alley... I use cuteftp, and it usually does all this stuff for you. all you have to do is right click on the file you want to edit, and it opens it up in notepad, or the editor you choose. just make sure you save the file before you close it. after that cuteftp will have a window that says "upload" or "cancel".. choose upload. if you wish to change the editor, just go to editsettings in cuteftp, and find the text that says "helper applications" in the window that pops up. click that, and you can choose your program. - Original Message - From: "Tony Daniels" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 10:18 PM Subject: [PHP] Newbie Help!! Please Look! Hello, I need to know if there is a program out there that I can use to edit the PHP files. I use CuteFTP to download the files from my server as I need to change some wording around from time to time. Does anyone know the correct procedure for downloading a php file with CuteFTP and then a program that I can use to edit the text I need to edit. Then also, the correct way to upload it back to the server using CuteFTP. Do I use Binary or ACII. Or, if I am way off and there is a program that makes CuteFTP look silly, please let me know this also. I am open for any suggestions, as long as they are detailed. Please email responses to [EMAIL PROTECTED] . Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie Help!! Please Look!
forgot to mention that ascii/binary is auto in cuteftp - Original Message - From: "chris herring" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 19, 2001 1:51 AM Subject: Re: [PHP] Newbie Help!! Please Look! right up my alley... I use cuteftp, and it usually does all this stuff for you. all you have to do is right click on the file you want to edit, and it opens it up in notepad, or the editor you choose. just make sure you save the file before you close it. after that cuteftp will have a window that says "upload" or "cancel".. choose upload. if you wish to change the editor, just go to editsettings in cuteftp, and find the text that says "helper applications" in the window that pops up. click that, and you can choose your program. - Original Message - From: "Tony Daniels" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 10:18 PM Subject: [PHP] Newbie Help!! Please Look! Hello, I need to know if there is a program out there that I can use to edit the PHP files. I use CuteFTP to download the files from my server as I need to change some wording around from time to time. Does anyone know the correct procedure for downloading a php file with CuteFTP and then a program that I can use to edit the text I need to edit. Then also, the correct way to upload it back to the server using CuteFTP. Do I use Binary or ACII. Or, if I am way off and there is a program that makes CuteFTP look silly, please let me know this also. I am open for any suggestions, as long as they are detailed. Please email responses to [EMAIL PROTECTED] . Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] need help
this is really buggin me... i've got this free-for-all that i want to make, and everything seems logical, but echo "form method=\"POST\" action=\"$PHP_SELF\" name=\"linkadd\""; echo "input type=\"text\" name=\"url\" size=\"20\" value=\"http://\"br"; echo "input type=\"text\" name=\"text\" size=\"20\"br"; echo "input type=\"submit\" name=\"submit\" value=\"Generate New Link\""; echo "/form"; if (isset($url) isset($text)) { $fp = fopen("./file.txt", "w"); fwrite("$fp", "a href=\"$url\"$text/abr", "w"); fclose($fp); } ... that isn't writing anything to the file. any help would be appreciated. thx in advance
[PHP] Blah I'm Stupid
I got a question here. How would you go about calling variables from a form. I'm sure this is super-easy, but I'm a newbie. Any help would be greatly appreciated.
Re: [PHP] Blah I'm Stupid
how would you go about writing that data do a text file then? - Original Message - From: "David Robley" [EMAIL PROTECTED] To: "chris herring" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 10:19 PM Subject: Re: [PHP] Blah I'm Stupid On Wed, 28 Mar 2001 13:44, chris herring wrote: I got a question here. How would you go about calling variables from a form. I'm sure this is super-easy, but I'm a newbie. Any help would be greatly appreciated. Just prefix the form object names with $ Say you have a text box set up like so: FORM ACTION=check.php METHOD=GET input type="text" name="avail" value="" INPUT TYPE=SUBMIT /FORM and in check.php ?php echo $avail; ? will show the value entered in the text box -- David Robley| WEBMASTER Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Blah I'm Stupid
ok here's the script i have, and i keep getting errors ? $fp = fopen("file.txt", "w"); $fp = fputs("file.txt", "a href=\"$url\"$text/abr", "r+"); $fp = fclose("file.txt"); echo "form method=\"post\" action=\"$fp\""; echo "input type=\"text\" name=\"url\" size=\"20\" value=\"http://\""; echo "input type=\"text\" name=\"text\" size=\"20\""; echo "input type=\"submit\" name=\"submit\" value=\"Generate New Link\""; echo "/form"; ? what's wrong with it. it says it's with the fputs and fclose things. ----- Original Message - From: "David Robley" [EMAIL PROTECTED] To: "chris herring" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 11:06 PM Subject: Re: [PHP] Blah I'm Stupid On Wed, 28 Mar 2001 14:31, chris herring wrote: - Original Message - From: "David Robley" [EMAIL PROTECTED] To: "chris herring" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 10:19 PM Subject: Re: [PHP] Blah I'm Stupid On Wed, 28 Mar 2001 13:44, chris herring wrote: I got a question here. How would you go about calling variables from a form. I'm sure this is super-easy, but I'm a newbie. Any help would be greatly appreciated. Just prefix the form object names with $ Say you have a text box set up like so: FORM ACTION=check.php METHOD=GET input type="text" name="avail" value="" INPUT TYPE=SUBMIT /FORM and in check.php ?php echo $avail; ? will show the value entered in the text box how would you go about writing that data do a text file then? File system functions. fopen the file you want to put the data in, fwrite the values from the variable(s) to the file and fclose the file at the end of the process. Note the ways you can open a file with fopen; and be aware of file permission problems because this is done as the user the web server runs as (*nix, dunno about windows). -- David Robley| WEBMASTER Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] cf to php
is there a php equivalent for this little tidbit from a friend's cf script? here it is: cfif NOT ISDEFINED("url.page")