Jump to content

Mr.x

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by Mr.x

  1. Good Afternoon, Does anyone know of a way of displaying a file uploads status. ex 1023/4993 KB uploaded and it updates the user every couple seconds?. Thanks in advanced. Sean
  2. Thank you very much, really appreciate it!! :D
  3. Good Afternoon. Creating a user search and am having some issues with the sql queries. Search options are Username Contains : (Input) Location : (Input) Age Minimum (Input) Maximum (Input) I need it so if they only enter a username it finds that username, or if they only enter a location it finds everyone in that location. But I also need it so if they enter a location and age, it only retrieves people who are that age and live there. etc. Thanks in advance, Sean.
  4. Mr.x

    Parse error

    [code]$content = mysql_query("SELECT * FROM news WHERE id = {$_GET['id']}") while ($row = mysql_fetch_assoc($content)) { echo "<a href='rediger.php?id=".$row['id']."'>".$row['title']."</a> <br>"; }[/code]
  5. Hello all! Anyone know of a way to format a textarea input to html. For instance if you pressed enter and skipped a line, it would turn it into <br>. Another example could be posting on this forum, how if you skip 5 lines, you're output is the same etc. Also can this step be reversed so the user can edit a post?
  6. Hello Everyone, Just wondering if anyone knows a way so that say I have a script that prints out a result from a database and its result is more then 10 char, to stop on char 10 and add ... ie. applecherrybanana <- Normal applecherry... <- After Thanks alot, Sean
  7. Mr.x

    dynamic

    I had to do something similar for a cell phone store, except it was with manufacturers of the phones. One of the best tips I got was to create a seperate table just for differn't categories or product types. Ie in the table would just be Servers Desks Monitors Phones etc. I then would while loop all of these out and it created a list of items for them to choose... So say they choose servers, it would go to details.php?type=servers for example. Before hand you have to figure out some of the things they have in common, so are you getting into specific detail with each object or not? If not then you can do statics of such things like quantity, location, year purchased, etc. Then the script loops through your database and outputs out any "items" that are categorized as a server to a new row in your table, then you have standard functions such as add or subtract them. Then later on you make an admin panel so if they add in SUPER SERVERS then all it does is create the new category and they have the option to add products as Super Servers. Not sure if this helps, if it doesn't help hopefully it will help you solve some questions. -Sean
  8. Hello Everyone, I'm working a menu bar but was hoping to stay away from javascript and when a user clicks on say for instance Flowers then the menu offers more options below on the next page. I have a header file, so was thinking if I am able to either call or pass on expand="flowers" then just have an if expand == "flowers" print etc. Any Suggestions?
  9. Try this, not 100% sure. Probley too simple to be true! Replace the following section, if it doesn't imideatly work then change it back.. [code] if ($problem == '1') { if ( $_POST['weapon_hands'] == '1' ) { $template->set_filenames(array( 'body' => 'admin/weapon_add_one.tpl') ); $template->assign_vars(array( 'PROBLEM_STATEMENT' => $problem_statement )         ); } elseif ( $_POST['weapon_hands'] == '2' ) { $template->set_filenames(array( 'body' => 'admin/weapon_add_two.tpl') ); $template->assign_vars(array( 'PROBLEM_STATEMENT' => $problem_statement )         ); } else { [/code]
  10. That is the craziest thing i've seen all day! Wonder what that program ran? If you havn't already make sure you can your computer and also try running some network security programs to check your computer for any newly opened ports? Make sure you have a firewall aswell. Another security tip is to contact the hosting company. If you don't have access to the logs they do. See if there was an unauthorized FTP login or if it was a vunlernability in eCommerce. You should also contact eCommerce because it is their responsibility to ensure their scripts are safe, especially when dealing with funds and sales.
  11. I would have to think the same as Birdie. They would have a special "login" area for news reporters, could be in anything from PHP to ASP or even a desktop based program in visual basic, c, the options are unlimited. It would then probley either do a quick "spell check" and then im assuming they would have senior editors to overlook again and chose if its worthy of views. If you check articles right away you'll often see many errors then as you keep refreshing they start dissapearing, sometimes they change the titles of them too
  12. Background image gone for sure, looks like an old maxpages or angelfire kind of site (FREE) Get away from the oval header... try a rectangle if you want to go for a hard look or curved corner for a smoother design. Possibly differn't background color for link bars or some sort of design. If you need any help let me know, i'll gladly help.
  13. Excellent Job, I can't wait to see where this site goes. I just finished coding a similar RPG site and understand the challenges behind it. My suggestions would be mainly for main page because thats where your usually going to either GRAB the user and pull them in for registration or going to lose them. 1) Maybe scaling down your header welcome, like not the actual image but the purple around it, on a small resolution I noticed it took up a massive amount of the area. 2) I feel like there is alot of space being wasted, like you want your register right at the top, in their face to grab the attention so they don't have to hunt for it... 3) I also feel like there is space lost by the poll, most people wouldn't want to scroll down that far to see the news. Time is also still not working for me on NAV and too much space is wasted on the search. Possible layout for index : Header Ad, advertising a game, shop, site related or outside party. Welcome image, maybe no purple (I feel like there is too much) with no curved border just the image.. below it your short description. To the right side stats, login, latest posts, poll.. On the left, register, news If you need any help working on the site or code just let me know, i'd be happy to help.
  14. I like the concept of the site so I hope you do well. I have to agree about the hope page and how everything seems very crammed. My suggestions include : 1) Header for news area 2) Table border = 0 3) Put in some spacing either through cell spacing or in css with padding 4) Your google ad also, I don't remember the terms but maybe pushing it to the right bar or moving it below the news (sorry don't remember if your allowed to do that though so if i'm wrong I appologize.) If you'd like help cleaning up your code and making it look better let me know, i'd be glad to help out.
  15. Good Evening Everyone, Below is posted a script that I found on an online tutorial. I need to create a menu bar where when you rollover text a css layer appears and STAYS visible UNTIL your roll over another. The script allows them to become visible, but doesn't make the previous one disabled ie. I mouseover img1, txt 1 appears. I roll over img 2.. txt 2 appears and txt 1 should Dissapear. Thanks in advance, Sean [code] <style> div.hidden_layer { display: none; speak: none; } div.visible_layer { display: block; speak: normal; } </style> <script> function doHoverText(sID) { // sID is the ID of the layer we want to show. // If no ID given, bail out: if (!sID) return; // Get a reference to the actuall layer: var oLayer = (document.getElementById(sID)) ? document.getElementById(sID) : 'undefined'; // But bail out if the layer was not found: if (!oLayer || oLayer=='undefined') return; // Then show the layer we want: oLayer.className = "visible_layer"; } function doMouseOver(oImg, sID) { doHoverText(sID); doHoverImage(oImg); } </script> </head> <body> <img src="image1.gif" onMouseOver="doMouseOver(this, 'changing_layer_1')"> <img src="image2.gif" onMouseOver="doMouseOver(this, 'changing_layer_2')"> <img src="image3.gif" onMouseOver="doMouseOver(this, 'changing_layer_3')"> ... blah blah... <div id="changing_layer_1" class="hidden_layer">Layer 1 ... blah blah...</div> <div id="changing_layer_2" class="hidden_layer">Layer 2 ... blah blah...</div> <div id="changing_layer_3" class="hidden_layer">Layer 3 ... blah blah...</div> [/code]
  16. Thank you very much, works great :)
  17. Good evening everyone, Im not 100% sure if this is going to be done in MySql or PHP, thought i'd have my best chance here though. I'm working on a script that calculates a users profits from daily purchases. Basically what I have is the table where all the purchases are which is named `purchases`, within this is all the activity and information which includes the date of purchase and costs. What im hoping to do is find all purchases by seller using seller_id and then add up all of their sales (money/cost the buyer paid is named `price`) and devide it by 2. ie. Select `price` FROM `purchases` WHERE seller_id = "*seller id session here*" AND date = ".$day." Then add all of their "price" fields and / 2 Any help would be greatly appreciated. Thanks Alot, Sean  8)
  18. Sorry wasn't clear, I meant like if your encrypting a copy of the password why would you want the original un-crypted password? Would it decrease the security? (IE. Injections?)
  19. I don't have time to look at the code of the script, but a possible quick fix could be putting on line 1 [code] <? session_start(); ?> [/code] I'm not 100% sure.
  20. What code is line 51? Just for easier reference?
  21. Try [code] if(!$_POST['cat_name'] || !$_POST['cat_description']){ echo "<p align='center'>Missing Form Information!</p><br> <p align='center'>Please use your browser back button and complete the form.</p>"; [/code]
  22. Theres 2 ways to get around this. Either put it in an Echo or take it out of the php. [code]if ($scorelevel > 13000) {     echo "<p>You are on/passed Level 32</p><p><strong>You have finished the game. Of course you can still play. I make new levels all the time!</strong></p>";      echo "<object width='550' height='400'>    <param name='movie' value='somefilename.swf'>    <embed src='/images/fireworks.swf' width='350' height='200'></embed>    </object>"; }[/code] OR [code]if ($scorelevel > 13000) {     echo "<p>You are on/passed Level 32</p><p><strong>You have finished the game. Of course you can still play. I make new levels all the time!</strong></p>"; ?>     <object width='550' height='400'>    <param name='movie" value="somefilename.swf'>    <embed src='/images/fireworks.swf' width='350' height='200'></embed>    </object> <? } [/code]
  23. Hey Everyone, I'm just working on a small project for my school and am having some problems. Basically my script is taking the information from a database and putting it into a table. There are alot of results so to help the users eyes, every 2nd table is a differn't color, for ex. Row 1 - class="one" (in the CSS class one is a light grey) Row 2 - class="two" (in the CSS class two is a light tan) Row 3 - class="one" Row 4 - class="two" Row 5 - class="one" <? $studentid = mysql_query ("SELECT * FROM studentid WHERE category = '".$category."'"); echo "<table width='100%' border='0' cellpadding='5'>"; $row = mysql_fetch_assoc($studentid); then at this point it would have to set either class one or two ex. echo "<tr> <td class='one' style='font-size: 9'><strong>".$row["studentid"]."</strong></td> </tr>"; Any help would be greatly appreciated.
×
×
  • 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.