Jump to content

SFB

Members
  • Posts

    282
  • Joined

  • Last visited

Everything posted by SFB

  1. What happens when you print this page? Is it still hard to read? if it is you could make a new page and just change the css to make it better for printing. then you just place a link that says something like "printer friendly page" with mabey a small picture of a printer. this may sound like a lot of work but it really shouldnt be once you have the main page done. you would just change you grey background to white and text to black.
  2. this is a funny script. I do agree with justsomeguy that it would be mean to just open someone's cd drive. too bad this doesnt work in more browsers. I didnt think this would actually work but i tested it and it does. this is interesting.
  3. It all depends on you php abilities. if you are a good programer like lets say justsomeguy for example, it would probably take you lessthan a week days spending 2-3 hours on it a day. if you were me it would take about a week and a half at 2-3 hours a night. it also depends on how good you are at debuging scripts. EDIT: I would start by looking at getting familiar with the php mail function or whatever you are going to use to send the newsletter. then i would make a form and have php process and send it . then you can work on making things fancy!
  4. what it looks like to me is the file you are trying to open isnt there.
  5. SFB

    Login Script & Security

    ok thanks, I got it working for the most part. I still have to do some more scripting like mabey at least encoding the passwords so i dont read them. and on the profile/changeprofile page i have to do the scrip for changing the password. I am going to have them type in the old one then type in their new one then confirm the new one. my site is sometimes on and sometimes not. it will probably be online for a larger chunk of time (like forever) by the end of this week. anyways if you look between 5 hours ago and now it should be online. well anyways take a look at the login script http://snowforts.ath.cx/loginEdit: WELL ANYWAYS! ha ha I just noticed that i "like" said that alot lately.
  6. SFB

    Login Script & Security

    well if i went like $myvar = "test";then later on i went $myvar = "finished";myvar would now be finished insted of test. Is it the same with arrays?
  7. SFB

    Login Script & Security

    what would i change in php.ini that would make sessions always start so i wouldnt have to use session_start(). I have heard of people doing this but i havnt seen where to do it.another thing can i reset things in an array like i can with variables?if so how would i do this in my case. I would rather not mess up my files event though i have a backup.
  8. SFB

    creating a file

    hey dan, how are you trying to create this file? i would just open it even though it isnt ther and then write a message like mitch does. I am using the same type of server and i dont have all the problems you do. mabye it is because i have my server installed as a service on windows and you are using fedora core 5 but that shouldnt make much difference.
  9. SFB

    writing data to a file

    I really shouldnt have made this new topic. it related so much to my old one i got all the help i needed there.
  10. SFB

    Login Script & Security

    I have read through most of that before but what i dont undersand is how to make the session work without cookies if the person does not have them
  11. SFB

    Login Script & Security

    thanks. I sometimes use an editor with syntax coloring but i didnt think of it then. thanks for the tip!anyone have a good tutorial on sessions?
  12. SFB

    Login Script & Security

    ok everything seems like it should work but it doesnt. what would this error meanParse error: syntax error, unexpected T_STRING, expecting ']' in C:\Program Files\xampp\htdocs\login\register.php on line 11what should i be looking at on line 11Edit: here is my script <?php$username = $_POST['username'];$password = $_POST['password'];$conpassword = $_POST['conpassword'];$name = $_POST['name'];$lname = $_POST['lname'];$email = $_POST['email];if(($username != "") && ($password !="") && ($email !="") && ($password == $conpassword)){include_once('C:/Program Files/xampp/htdocs/userdata.php');$newuser = array();$newuser['username'] = "$username";$newuser['password'] = "$password";$newuser['first'] = "$name";$newuser['last'] = "$lname";$newuser['email'] = "$email";$users[] = $newuser;function write_users(){ global $users; $str = "<" . "?php\n"; $str .= "\$users = array();\n\n"; for ($i = 0; $i < count($users); $i++) { $str .= "\$newuser = array();\n"; $str .= "\$newuser['username'] = \"" . $users[$i]['username'] . "\";\n"; $str .= "\$newuser['password'] = \"" . $users[$i]['password'] . "\";\n"; $str .= "\$newuser['first'] = \"" . $users[$i]['first'] . "\";\n"; $str .= "\$newuser['last'] = \"" . $users[$i]['last'] . "\";\n"; $str .= "\$newuser['email'] = \"" . $users[$i]['email'] . "\";\n"; $str .= "\$users[] = \$newuser;\n\n"; } $str .= "?" . ">"; if (!$handle = fopen("users.php", "w")) { echo "We are sorry please go back and try Registering again. If this problem occurs again please contact the administrator<!--fopen-->"; exit; } if (fwrite($handle, $str) === FALSE) { echo "We are sorry please go back and try Registering again. If this problem occurs again please contact the administrator<!--fwrite-->"; exit; } fclose($handle);}write_users();}else{Print"Please check to make sure that all fields were filled in Corectly!";}?>
  13. SFB

    Login Script & Security

    one last thing i dont get is what is the purpose of the leading \ in $str .= "\$users = array();\n\n";
  14. SFB

    Login Script & Security

    so all i would have to do is add include('userdata.php'); somwhere in the file and then when i want to save a new user i could call the function. I got another question too. i never really understood how something like $str = "<" . "?php\n"; $str .= "\$users = array();\n\n"; for ($i = 0; $i < count($users); $i++) { $str .= "\$newuser = array();\n"; $str .= "\$newuser['username'] = \"" . $users[$i]['username'] . "\";\n"; works. what is the purpose of the str .="stuff" I understand the purpose in the first line so php doesnt think you are starting another php thing inside of itself. well i guess what i want is a link to something that explains the .= and "stuff" . "otherstuff" and how to properly use them
  15. SFB

    Login Script & Security

    o well i will clarify myself by telling you what i do in my scriptfirst i open the file then i read itthen i remove the end of php (?>)then i add the new arraythen i place the end php symbol (?>) at the endthe i write the data over the exzisting file. i dont want to do it this way. somehow i want to take the data i have and just write a file. mabey somehow i could include my userdata.php file and then rewrite the exzistign arays and then add the new one.
  16. SFB

    Login Script & Security

    I am confused on how this works. do i just use this for the new user or do i include the userdata.php file and it will re write it for me. i realize i will have to add a fwrite and the things that go with that function. I want a way to write data to this file without opening it taking the data and then removing parts and placing them back after i add the new data. This sounds confusing but i hope you will understand.
  17. SFB

    writing data to a file

    i guessed that people wouldnt undersand. well rember when i was working on a login script. I should have just posted it in that one. I will go back to that topic and things be more clear again.
  18. SFB

    writing data to a file

    I was wondering if there was a way to write data in a file just before ?>. It would be helpfull. I could just remove ?> and putt it back in when i write over the file again but I dont feel like doing it that way.
  19. SFB

    NEW to PHP

    sometimes if i am confused on how a function works i go to http://php.net and type in that function in the search box. they also have some good siple scripts that may be helpfull.
  20. dan, did you look at any of the websites that the httpd file recomended reading? i would start by looking there. here they are if you dont want to look http://httpd.apache.org/docs/2.2/http://httpd.apache.org/docs/2.2/mod/directives.htmlEdit: humm those actually dont look that helpfull, sorry.
  21. I think you could use css and set the margin left to auto and the margin right to auto and it should center it if the margins are the same. It works for tables i havent tested it on a frame though.
  22. SFB

    Symbols

    Oh no! not an image!....His site was image free. lol dan you will have to show this to me sometime it sounds like it would look very funny. you could also try getting those charictors using php. i think there was something like char(); or chr(); but i could be wrong.
  23. What do you mean by lock down the os? I currently only host my site for myself to see i have to type in http://localhost/ to see it and my computer is only on for a few hours in the evenings. I hope the dcole server gets going soon.
  24. thanks, i will use the div and add that to the style sheet that way it will be less work for me!
  25. I have been making the necessary changes to make my pages into xhtml. one thing i have found is that the browsers change how they read a page by the doctype. anyways now the <div> tag has a line break after it like the <p> did in html. this is happening for me in IE, Opera, and firefox it may be more browsers but those are all the ones i have. I was wondering if there was a way to remove the line break that is automatically added. or i could settle with another tag that does the same thing without the line break. i am using css to change the style of some words and now when switching to xhtml i have line breaks in places they are not needed.
×
×
  • Create New...