Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • MSN
  • Website URL
  • ICQ

Frieling's Achievements


Newbie (1/7)



  1. Well I am building this tool for the clan I am in to keep track of each member. I decided to do a 2 panel layout. Far left panel, is the navigation(Add soldier, Modify soldier). and the right panel is where you can add the soldier form, and modify the soldier form. But I am having troubles getting the div to display. They are all located inside divs like so(index.php): <html><head> <title>[1stAD] MILES</title> <link rel="stylesheet" type="text/css" href="includes/main.css"> <script type="text/javascript" src="includes/js/jquery.min.js"></script> <script type="text/javascript"> function mod_soldier(){ if ($('#mod_form').css('display') == 'none'){ $('#mod_form').fadeIn('slow'); } } </script></head>]<body> <div class="header"></div> <div class="content"> <!--Left Navigation Panel Start--> <div class="Nav"> <ul> <li><a href="javascript:mod_soldier()" id="mod_soldier" class="button">Modify Soldier</a></li> <li><a href="#" id="add_link" class="button">Add New Soldier</a></li> </ul> </div> <!--Left Navigation Panel Start--> <!--<div class="SoldierList"> </div>--> <!--Right Side Panel Start--> <div class="SoldierInfo"> <!--Modify Soldier Form Start--> <div class="mod_form" style="display:none;"> <form action="" method=""> Search For Soldier: <input type="text" /> </form> </div> <!--Modify Soldier Form End--> </div> <!--Rigt Side Panel End--></div> <div class="footer"> Copyright © 2013-<?php echo "".date('Y').""; ?>, 1st Armored Division. All Rights Reserved<br /> Memebership Information Logistics Electronic System 1.0</div></body></html> And then here is what it looks like:
  2. can you give me an example of where i would use it at?
  3. Alright, I am trying to create a code to scan all text files in a directory, then each line in the text files have sections seperated by a "|". I need to insert each section in a line into an array, but i am totally stumpt. This is what i have: <?php $path = './';$findThisString = '|';$dir = dir($path);// Get next file/dir name in directorywhile (false !== ($file = $dir->read())){ if ($file != '.' && $file != '..') { // Is this entry a file or directory? if (is_file($path . '/' . $file)) { // Its a file, yay! Lets get the file's contents $data = file_get_contents($path . '/' . $file); // Is the str in the data (case-insensitive search) if (stripos($data, $findThisString) !== false) { $file2 = fopen($file, "r"); while (!feof($file2)) { $results = explode("|",fgets($file2)); } fclose($file2); for($i = 0; $i < count($results); $i++) { echo $results[$i]; unset($results[$i]); } } } }}$dir->close();?> Any ideas?
  4. Okay. Well obviously you guys aren't understanding what I am saying. IDK how to add it all up. Look at my pseudo code. That is what i need to do, but don't know how to.
  5. I just need to learn how to add up the values overall. The PHP/HTML tutorials do not help this case.... Heres some pseudo code: Radio button1, value = 1Radio button2, value = 2Radio button3, value = 3 Person chooses RB1 3 times, RB3 2 times, and RB2 2 times. Add the value of RB1 3 times, add the value of RB3 2 times, and add the value of RB2 2 times. Insert into tables of MySQL DB. Thats what i need to do. Idk how to do it. Does that help?
  6. Alright so i am a decent PHP coder. but i dont use radio buttons that much, Ive tried to google for that. But i need to use radio buttons and assign it each a value. 1, 2 , and 3. then after the user selects which ever radio button they want, it will add up how many time either 1, 2, or 3 was selected, and its put into a MySQL database. I have no clue how to do this, so any ideas?
  7. Frieling

    Ban Search tool

    after some more help with my friend. finally got it working. Thanks for the help guys.
  8. Frieling

    Ban Search tool

    heres the new code. still not working of course:index.php: <?phpecho '<form action="checkban.php" method="get">';echo 'Please Enter a 32 digit GUID<input type="text" name="guid" value="guid">';echo '<input type="submit" value="Submit">';?> checkban.php: <?php$file = "pbssbans.dat";$handle = fopen($file, "r");$contents = fread($handle);if ($contents == $guid) { echo "GUID is banned";} else { echo "GUID is not banned";}fclose($handle);?>
  9. Frieling

    Ban Search tool

    to be exact i want it to use what the person entered in the text area and see if it matches anything in the txt file.
  10. Frieling

    Ban Search tool

    Alright well i am trying to build a ban search tool. this is what i have so far, but i cannot figure out why it keeps saying undefined variable. lemme know what i need to do to fix this: <?phpecho '<form action="checkban.php" method="get">';echo 'Please Enter a 32 digit GUID<input type="text" name="$guid">';echo '<input type="submit" value="Submit">';$file = "pbssbans.dat";$handle = fopen($file, "r");if ($handle = $guid) { echo "This GUID is banned";} else { echo "GUID is not on banlist";}fclose($handle);?>
  11. sorry to bring up a old post, but i am back at it again.this is what i have so far: <?phpfunction main(){ echo '<form action="index.php?op=search" method="get">'; echo 'Enter a 32 Digit GUID<input type="text" name="guid">'; echo '<input type="submit" name="go" value="Search">';}function search(){global $guid; $file = 'banlist.txt'; $read = fopen($file, "r"); if(!$file){ echo 'File does not exist'; } else { }}switch($op){ default: main(); break; case 'search': search(); break;}?> Now how can i check it against the banlist.txt to see whether the entered string is in that file. i keep getting confused on that part.
  12. Alright,Well i am trying to figure out how to do it do it via file system way. I started with a simple form with the text box of the value of query. How can i use the file system to search it line by line, and then it gets the info that was entered into the text box?
  13. Alrightt,What about using a XML Parser? But if we did that, how would i be able to put stuff like i showed in there automaticly.
  14. Alright,I cannot figure out how i can scan a txt file using PHP. For example:Banlist.txt contents:vcfdasacdjaskbcdasocbdhas GeorgeEndvcfdasacdjaskbcdasocbdhas = GuidGeorge = NameNow i don't even know how to get started. Any help?P.S. I am finally back.
  15. Frieling

    Logging System

    lol almost all of it, ye i code the php language, but dang seemed like u were speaking another language
  • Create New...