Jump to content

Jocka

Members
  • Posts

    344
  • Joined

  • Last visited

Everything posted by Jocka

  1. What I'm trying to do is simply like forums. I have my topics and my replies. I want to bring the newest post to the top. I just for some reason have no clue where to start lol. I was thinking maybe somehow doing a while statement on the topics and running a while statement within that for the replies. After typing all that out thinking it would work, I was then missing some topics that were just made. I've coded (and helped code) 3 different forums now. I've had no problem with this before but for some reason my brain just isn't working now. I've lost all my old stuff and can't figure out what I did. Can somebody help please? Please don't make me study forums :P
  2. .. just a question.. how many of us have wrote some code that nobody else has ever wrote? I mean, it may not be the EXACT code used by someone else, but it's generally the same thing as some other code you can find online. I don't see any need in encrypting a clients stuff. If he wants to give it away and you haven't agreed otherwise, that's his business. The only stuff I MIGHT encrypt is pages on my server. That would just be in the case that my server got hacked, they wouldn't know where to begin. they could delete all the files on my server but I always keep backups. And as long as my codes encrypted they still won't find any useable information like database passwords or nothing. My opinion - who cares.
  3. you do it by line? .. hmm. See the idea i'm thinking is like with forums, we have categories and forums. We'll we need to loop through the categories and then through the forums in the current category. I have found a way to do it without using any more arrays then I already had. I messed with it for a few hours after I posted this. Now it runs like a charm (so far). I'm sure there is a way to run the loops like I mentioned though. I'm not sure it's the best way now (now that I have this way working) but i'm still interested about how much slower or faster it will run through.
  4. I created this template system I use so I can set loops like {loop} info {/loop} and i can run 'info' as many times as I want. The problem I came up with recently was looping within loops. I created some functions for 'child_loops' but I'm not sure this is the best way to go. I was thinking maybe just using a series of arrays could do the trick but I tend to lose my mind quickly with arrays. What I was thinking I could do is save all the info like this: (array print) Array: 0 => array (0 => "TEST", 1 => "info {CHILD} {info} {/CHILD}"); 1 => array ("TEST" => "CHILD", "info" => "new info"); then run through the arrays. I think I'll need it to run the array backwards so I can find child loops first right? So it can find "TEST" in the array before it and replace "CHILD" loops with "info". .. .. hope I didn't confuse anyone. This is the best way I can think to do it but it's just driving me crazy. And then that will only hold the loops drawn from the original code and I'll have to change that so I'll have to create a temporary array to hold the new info and replace the original info in the first array. This is 2 much for me to comprehend (I have a headache). I'm trying real hard to figure out where to start lol. If anyone wants to toss me some code to run with then I'll be greatful.
  5. in the function put in right after the start of the function: global $_POST; that SHOULD do it.
  6. if it helps.. I laughed.. or giggled sort of..
  7. I think SWiSH is what I used to use. Actually I'm pretty sure it is. I still get email from their site.. that was a few years ago lol. I didn't like it though. I was a beginner and it wasn't for me lol. I learned very slowly with it. I think i'll go with that Autodesk thing for now at least.
  8. Thanks for both replies. Ober, you gave me little hope HAHA. But I'm going to keep trying anyway. Crayon Violent, .. I think I hate flash now. lol. It seems a tad ridiculous that the only way to really do anything with flash is if I pay the creators of it..
  9. Well I know I can. What I need is some code to get me started. I used form validation codes I found online but they didn't help any. Basically I wanted it to do something like this: PHP WAY OF DOING IT: [code] <?php $link = NULL; // TO SAVE QUERY INFO foreach($_GET as $key => $value){   if($value !== '' && $key !== 'submit'){     if($link == NULL){       $link .= "?" . $key . "=" . $value;     } else {       $link .= "&" . $key . "=" . $value;     }   } } $link = "search.php" . $link; header("Location: $link"); ?> [/code] Thats what I use now for the PHP file that does what I want. But I need a JAVASCRIPT version of this that does it as soon as the page is submitted.
  10. Alright. 2 completely different questions and one thread. Here we go. 1. Is there anything I can find FREE to do flash with? I mean, something worth using? I started learning flash a while back and my harddrive was fried and I lost my CD and I'm not paying for another one.. forget that lol. But I'd like to learn flash a little more but I don't want to pay those high prices for the software. 2. Where is the best place to find a job? For web designers, php developers, etc. I've tried scriptlance, php-freelancers.com, and all those BIDDING sites. Then I put a resume on monster and got a few emails but thats where it all stopped. I'd like to find a way to get jobs without bidding or getting my hopes up. I'm working on a site right now so I can at least have a site for people to come to and maybe FIND ME. But that won't be done for a few more weeks more than likely. I need money now though and my part time job isn't doing the trick.
  11. well for one you didn't finish your SQL. You have: $chari = @mysql_num_rows(mysql_query([b]"SELECT * FROM `users` WHERE `charid`"[/b])); it should be something like: $chari = @mysql_num_rows(mysql_query([b]"SELECT * FROM users WHERE charid[i]='SOMETHING'[/i]"[/b]));
  12. That sounds reasonable. Alright, I'll do that.
  13. ok so account_num , meter_num , are in your table. You want this stored in an array.. maybe store it by id and put another array in there. you could use something like: [code] <?php $accounts = array(); $sql = "SELECT * FROM tokayacct";   $res = mysql_query($sql) or die (mysql_error());     while($r=mysql_fetch_assoc($res)){     $accounts[$r[id]] = array($r['account_num'], $r['meter_num']); } ?> [/code] something like that might work..
  14. You could use SESSIONS, COOKIES, or a file. Sessions would probably be the best way. I've never needed fpdf so I dunno about that.
  15. You could do it a few ways really. 1. You could store the homework in the database using a form. 2. You could use a form to create a homework FILE. 3. You could just let them upload a file and read the file from the server Either way would be fine. But you should make sure only the teachers can submit the homework. Give them a password or something.
  16. Yea.. you'll need to set those variables first. send_email.php3 [code] <?php $contents = $_POST['contents']; $from = $_POST['from']; $subject = $_POST['subject']; ?> [/code]
  17. you could just do it a different way.. like instead of: $throw = true; use $throw = '1'; Then if($throw == '1'){   echo "Error message"; }
  18. How I did it.. something like this: [code] <?php $t_count = 0; // TABLE COUNT if($t_count == '0'){       echo "<tr><td>Blah</td>";       $t_count = 1; } else if($t_count == '1'){       echo "<td>Secnd Blah</td>";       $t_count = 2; } else if($t_count == '2'){       echo "<td>third blah</td></tr>";       $t_count = 0; } ?>[/code]
  19. I'd like to submit some tutorials but not 2 many and there's no point of them adding me as a tutorial writer if I only write one or 2 right? But the user submitted tutorial sectioin isn't too good. I mean, as far as the tutorials, they're good. But I'd like to be able to submit a tutorial and not have all that traffic directed to my server (all I have now is a 'test' server). I'd rather be able to submit it to fit just like the PHPFREAKS tutorials. Page by page. Would it not be just as easy to do this? To maybe make it where you can give a number of pages and submit the information page by page?
  20. By "Check the statements" I mean, check the fields for ones that aren't empty.. .. I just was lazy and didn't want to type all that out.
  21. So you can't check the statements and redirect the page according to what input fields were used?
  22. I made a post in the mod_rewrite forum before realizing that it's not mod_rewrite I should be using. It's JAVASCRIPT. What I need this code to do is check for any non-empty input fields and submit (to the same page) these fields ONLY. Example: [code] <html> <head> // JAVASCRIPT STUFF HERE (i dont' know it) // </head> <body> <form name="search" method="GET" onsubmit="check_form()"> <input type="text" name="user" value=""><br> <input type="text" name="city" value=""><br> <input type="text" name="state" value=""><br> <input type="submit" name="submit" value="Search"> </form> </body> </html> [/code] then it runs the code so that the url after submitting isn't like: search.php?user=&city=Dallas&state= I just want it to say (in this case): search.php?city=Dallas Right now i'm using another small PHP file to do this but I'd rather have it do all this on the same page.
  23. Thats not a bad idea. I've yet to write a tutorial. I'll make something tonight and see how good I am at this :P If it looks decent to me then I'll start sending some stuff.
  24. [quote author=Daniel0 link=topic=110909.msg449853#msg449853 date=1160490031] Sure it is not because Firefox hogs up a lot of system resources and thereby slows down your computer and not your internet connection? [/quote] Lol no. If I ignore all the add-ons and themes,etc.. Them firefox runs smoothly. As soon as I get one of those addons (on my old computer) firefox ITSELF seems to die. But no, it's not firefox in this case. The only one I've ever had problems with killing my sources was Opera. Everytime I opened that thing, my entire computer seemed to just move in slow motion.
  25. I'm a nice guy. Far too nice. This is where some of my problems come in. Most people that come to me with small projects (news scripts, shoutboxes, etc) I forward them here to find decent tutorials. They tend to get a little scared of these tutorials when they see that the last tutorial submitted was of august last year. Some new tutorials and some updates to old ones should be fine. Just get those dates changing lol. It scares off people that want to learn.
×
×
  • 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.