Jump to content

interpim

Members
  • Posts

    303
  • Joined

  • Last visited

    Never

Everything posted by interpim

  1. but Archadian does have a point... it is best to run through a seperate script instead of on the same file... to write the program you have, you would need 2 seperate files... one lets call name_entry.php then another called name_hello.php name_entry.php will have the following code... <Form action='name_hello.php' method='post'> Whats your name? <input type=text name=usename> <input type=submit value="submit name"> </Form> Next page will actually parse the input from that page and display the result... <?php $name=$_POST['usename']; //$_POST[] basically pulls the value from the input named inside the brackets, and now you are assigning that value to the variable $name echo "How are you today $usename"; ?>
  2. same... NYC weather... im in California
  3. it will work in the same page.. the echo is written wrong, but otherwise the code does work
  4. your calling echo like a function with $usename as a variable in that function... do it like so... echo $usename;
  5. use CSS style maybe... set no-repeat
  6. yes... i figured that much, my question is, does anyone know what files I should input this code? I know how to query a db and write/read from a flat file... the problem is, this code is a bit over my head and I need to know where to go to make changes etc. in phpbb
  7. Hey all, I installed a quick modification to help prevent spam on my phpbb boards... Well, it works fine, but I would like to be able to change the settings of it from the admin page. Basically I have modded the profile_add_body.tpl file and added the following code above the visual confirmation... <tr> <td class="row1"><span class="gen">What Realm of DAoC does Fenris Belong? (lower case) *</span></td> <td class="row2"> <input type="text" class="post" style="width: 200px" name="math_question" size="45" maxlength="45" value="" /> </td> </tr> in the includes/usercp_register.php file i changed the code around line 260 or so from the original to this else if ( $mode == 'register' ) { if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) ) { $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty']; } if (!isset($_POST['math_question']) || $_POST['math_question'] != 'midgard') {$error = TRUE; $error_msg .= (isset($error_msg) ? '<br />' : '') . "Incorrect answer to simple question..."; } } My question is... where do i load the answer 'midgard' (of course will change to a variable) and the question to be changed or edited from teh admin panel? Any help on this is appreciated. I am running version phpBB 2.0.18
  8. what is the difference between == and = ?
  9. you could use javascript to auto refresh the page... that may work, but I don't know any javascript
  10. http://www.google.com/search?q=php+hit+counter+script&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
  11. ROFL, sounds like extra credit Algebra homework... I sucked at Algebra Good Luck
  12. build a link, with the user id as the variable... send it to a script which redirects back to your admin page, or wherever you plan on deleting users from. Have a mysql query select the record based on the user ID, remove it, then return back to the original admin page. "DELETE FROM users WHERE id='$id' " would be the MySQL syntax I do believe...
  13. change index.htm in the line below to where you want it to redirect to... then, close the statement with a semicolon header("Location: index.htm");
  14. my host seemed to be having problems last night... I run a few website off of that same server, and never have issues with them... but I was getting slow responses from them also... I believe it finally worked itself out.
  15. rofl... the few people that went and checked this out pointed out a big problem LOL... I didn't realize but you can create an account without putting any data in... then pretty much hijacks everyone's record on the database. Guess It's back to the drawing board LOL
  16. Hey all, i just wanted all you to know that this site is awesome I have learned so much in such a little amount of time. I have been "making" LOL a program while I have been learning... I still have lots of things I want to add, such as graphics and an actual layout etc... but I think I have a pretty good start. All of the code was written by myself, with help from folks here on this site... well, let me know what you think... and please offer suggestions on how to fix or improve it http://interpim.com/ambassade/
  17. assign the cookie to a variable and use the variable... $var1=$_COOKIE['cookie_var']; (code with $var1 in it);
  18. well... the reason you would need to store them is so that the script doesn't duplicate the "random" number again in the future.
  19. will assigning a value to an auto incrementing value mess you up?
  20. i recommend PSpad... it has syntax alerts for several languages, including php... also sql, html, css, etc. and it tabs documents too, so if you need to switch back and forth between files quickly it helps a lot. and the best part is, you can't beat the price FREE http://www.pspad.com/
  21. the original form only submits the post data to the action attribute in the form itself... I have done this before, but I have to look again to see how I did it, I remember it took me a while of messing with it to figure it out.
  22. you can send the error back to the entry form page at the top if you want... basically, write your entry form page, with code to check if there are $_POST entries... like, <input type='text' 'name'='name' value='$_POST['name']'> if the $_POST['name'] is empty then so will your text box on your form. If it isn't then it means that it was sent back from the script that the form is submitting to. I am new at this, but if I understand correctly this shoudl work fine.
  23. no... form directs to teh php script... if that script has no output, then it can redirect back to the form page or another page. <?php if(entry_valid){ header("Location : valid_page.php"); } else{ header("Location : form_page.php"); } ?>
  24. if you don't pass any output before it you can redirect with the header() function after the code is finished
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.