Jump to content
xisto Community

sonesay

Members
  • Content Count

    958
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by sonesay


  1. Hi I have a page with a form with some input fields. When it is submited it goes to the comfirmation page. I want the form to have an input / button where if the user can enter/add more fields for input.i.e <form><input 0><input 1><input 2> or <button> <submit> --> (update this form with more input fields)<input ..><input ..><submit button> --> (submit to confirm.php)</form I want the user to be able to enter a value or have a <add form> button to be able to add more fields. I've tried searching the web but havent been able to find anything that works.


  2. THe problem i see is your trying to echo php code and expect it to work

     

    <?php

     

    if ($one==$two) {

    if ($two==$three) {

    echo " <?php

     

    From what i understand when you load a page all the php code has already been executed. so echoing another echo of <?php

     ?> wont work. It would just get ouputed as plain text "<?php .....". 

     

    So you will have to change your code so that it does not contain <?php tags inside a <?php tag

     

    <?php

     

    if ($one==$two) {

    if ($two==$three) {

    echo "<img src=" . $special[array_rand($special,1)] . $digits2[array_rand($digits2,1)] . ">\n";

    echo "<img src=" . $special[array_rand($special,1)] . $digits2[array_rand($digits2,1)] . ">\n";

    echo "<img src=" . $special[array_rand($special,1)] . $digits2[array_rand($digits2,1)] . ">\n";

     

    if ($one=="images/slots/04.GIF") {

    echo "<img src=" . $special[array_rand($special,1)] . $digits2[array_rand($digits2,1)] . ">\n";

    echo "<img src=" . $special[array_rand($special,1)] . $digits2[array_rand($digits2,1)] . ">\n";

    echo "<img src=" . $special[array_rand($special,1)] . $digits2[array_rand($digits2,1)] . ">\n";

    }

    }

    }

     

    ?>

     

    let me know if it works.


  3. I'm trying to validate a user's desired username for a registration page. I want to detect any illegal characters being used for a username. So far i have managed to include most execpt the '\', the '\' is used for escape and treating the preceding characters literally. I try to do '\\' but i get an error because it execects another character.

    $ck_result = "Default";$pattern = "/[!|@|#|$|%|^|&|*|(|)|_|\-|=|+|\||,|.|\/|;|:|\'|\"|\[|\]|\{|\}]/i";	// check for inputif($uname == '') {$ck_result = "<span class='error_header'>Required!</span>";}else if (preg_match($pattern, $uname)) {$ck_result = "<span class='error_header'>illegal characters</span>";}

    I have tried looking for more info but havent found any so far.

    Notice from BuffaloHELP:
    Always use proper bbcode tags. Title modified.


  4. Yeah Jihaslip thats the desired effect but I dont like frames(or fame effect) :D. I prefer the vertical scroll bar to span all the way from top to bottom and have the page appear as one long page. But I think the problem occurs when the page gets too long and the footer comes off position as here http://forums.xisto.com/no_longer_exists/ but its just cosmetic.

    I've tried the sugestion by buffalohelp its still not doing what I want it to do. There is another template i may look at its at http://www.openwebdesign.org/design/3270/zenlike/ its similar to what i want but without the top and bottom being set at 0 hopefully this wont lost position when i put in the content.

    Thanks for the link to that example on frame like layout. I would probably like to use something like that for future projects. As for now Il' keep trying to fix it or maybe try get it working on the zenlike template. But I really should keep working on finishing the site as much as Id like things to be exactly as I want it to be I know because of differrent browsers its almost impossible.

    Again thanks for your hlep guys Xisto rules!


  5. Another CSS problem thats been annoying me. I got this tempalte off http://peterned.home.xs4all.nl/examples/csslayout1.html the css file is here http://peterned.home.xs4all.nl/examples/css/layout1.css I went ahead and applied it to my template. Their main divs contain 1 main container, 3 sub divs (header, content, and footer).

    <div id="container">
    
    	<div id="header">
    	</div>
    
    	<div id="content">
    	</div>
    
    	<div id="footer">
    	</div>
    
    </div>


    I've had to add a few more divs inside the header div to include my table for banner and navigation.

    <div id="header">
    	<?php include("includes/_header_section.php"); ?>
    	<?php include("includes/_login_section.php"); ?>
    	<div id="content_section_heading"> </div>
    </div>


    my output template file http://forums.xisto.com/no_longer_exists/ its css http://forums.xisto.com/no_longer_exists/

    I need the content part to cover all the space between the header and footer to cover the #cotainers bg color.


    my original problem which lead me to redo the above template was the output of my news (sample version) http://forums.xisto.com/no_longer_exists/. Once the page got too long the footer which is surpose to be fixed at the bottom moves. I ran the document at w3 validator and it checked out ok.

    http://forums.xisto.com/no_longer_exists/ is using CSS from http://forums.xisto.com/no_longer_exists/ sorry its abit clutered and have alot of unused ids and classes there.

    Notice from BuffaloHELP:
    Always use proper bbcode tags.


  6. I recently got glasses because I didnt pass an eye check to get my drivers license. my vison is pretty bad on my right eye but my left eye is good enough. I'm not sure how that happen but I'm probably guessing it happen at a young age. If they had eye examinations in my younger school years I could of had or done something to try and fix it. Now I wear glasses for driving, reading and watching TV. I have it on most of the time when I dont wear them my eyes strain to adjust without them. I think more awareness should be made about the importance of retaining good eye sight.


  7. Yeah I've seen those reports too on TV and on the net. I been seeing them more frequently too. I do beleive its an addiction because I am addicted to online RPGs too. I play games because its like almost an instant satisfaction, a way to escape my worries in this world. I used to play games from an ealry child hood because there wasnt much to do to keep you entertained. The games provided hours of fun and you never seem to get bored of it. Its addictive because like all other kinds of addiction the people using/doing it cant or dont have the will power to control their urges. People with these addictions need support from friends and family.Theres boot camps setup to help people kick these addicitons or event doctors but some arnt lucky enough to have these facilites. If you know of friends and family who are addicted they are probably playing games because they are missing out in other parts of their life and need some guidance and support.


  8. Are you currently addicted to any MMORPG's? If so you are like me. I am currently addicted to ffxi. I know its bad for me and I know I should stop but its so hard too just quit. I've been playing the game on and off now for about 3.5 years and still no where near completed what I want to do in the Game. They keep releasing new expansions so you can never keep up unless you have an active community(clan/linkshell) which do the events you want because the end game experience is mainly dependent on having large groups of people(18+). This can be a problem when your online playtime differs so much because you play on a server with people from different sides of the globe so pretty much you dont get much done with out 18+ people there at the same time with the same goals.We've seen the reports on TV, Internet and news papers about these kind of addiction being so bad. I know I should quit or atleast cut down on playtiime and not let it ruin my life but I guess the reason I keep playing is because I dont want to lose the friends I have made online and give up on a game that I've invested so much time in. There is still things in game I want to do but its so hard and not easily achieved. I have been addicted to alcohol, cigeretes and drugs(weed) before but I've managed to quit. I used to be very active before and now I hardly go for walks. I guess thats what addiction can do to you if you dont find help.I am still playing, my subscription is still on, I dont know for sure when I will make the final decision and quit once and for all. I was planning to take a break at the end of june but this big event was planned so I am sticking around for anaother month...


  9. Yeah I have to admit I am guilty too. My life has suffered because I wasnt motivated enough to do things when they needed to be done. School, family, friends and work have suffered and now Im only realising how bad its become. Its a pretty hard habbit to kick, I still do it today its too hard sometimes to resist being lazy.


  10. thanks for info on changing the time zones. there is the other problem with it was it keep repeating the same minute.

    07-06-28 13:06:5607-06-28 13:06:57
    07-06-28 13:06:58
    07-06-28 13:06:59
    07-06-28 13:06:00
    07-06-28 13:06:01



    I noticed that after an hour it would change to
    07-06-28 14:06:01 so always stuck on that 6min into the hour. I went a head and tried to download and install php 5 but not very fimilar to mac os x so I googled and found this website. http://forums.xisto.com/no_longer_exists/ downloaded the file PHP 5.2.2 for Apache 1.3 and unzipped and ran it. the installation fails and now apache dont work :E. Right now im trying to get apache back to work so if any mac users fimilar with this problem please help.

  11. My setup is a macbook pro and I have apache+ mysql + php already included I think.

    the php is version 4.4.4

    I have been using the date() to store dates into my mysql tables in the past and it worked corectly. I dont know what could of happen but now the date() function is returning an incorrect time.

    I made a test script test.php

    <?php$date_time = date('y-m-d H:m:s');echo($date_time);?>

    and loaded it up. My laptops system time would be 1.35.33 PM

    and the date and time returned from php would be 07-06-28 13:06:56

    I would hit refresh on the browser but it would still loop in that same minute
    e.g.

    07-06-28 13:06:5607-06-28 13:06:57
    07-06-28 13:06:58
    07-06-28 13:06:59
    07-06-28 13:06:00
    07-06-28 13:06:01

    .........

    Any ideas on how I could fix this problem? would I just be better too to upgrade to lastest version of php and hopefully it will not have that problem.

  12. That way php will know what user is currently logged in. If you do not want two people logged into the same username, have php delete all rows from that userID when the person logs in.

    Thanks for your responses guys. I've got a few things Id like to ask about deleting user records to prevent users from logging in. You would have to readd the user to the users table when logging out right? what If users just close the broswer when leaving your site how would the users record be restored back into the users table?

  13. Well I dont use the $session variable at all. When I make my login scripts I write my own session scripts with it. It may take longer but there is no need for sloppy coding.

    Hi, I just want to ask what do you mean you dont use $session variable at all. do you mean you dont use $_SESSION[''] at all and store the users data by other means? If so could you explain how you do it your way? thanks.

  14. A while back i was looking for free hosting and a forumn suite for my own comunity. I ended up using hostingdirect.co.nz and php-fusion from https://www.php-fusion.co.uk/home.php It was pretty easy to setup and run. But my site required more specific functions other then generic CMS could offer and I wanted to learn PHP so I start reading tutorials and such to learn. I was working on them locally and they seem to run fine on my own server. When i upload my own site to the hostingdirect site I find they do not have safe_mode off. I got an error in my index.php file when i try and run session_start().

    From all the books and online resources I've seen we are taught to use session_start() so I wondered why was the php-fusion CMS working and my own wasnt. I looked into the source files looking to find if they did use a session_start() but could not find any. Their code was alot more complicated and longer then mine.

    My question is session_start()(sessions) not required to keep track of users details when loged in? Have they used other means i.e cookies or what ever there is to do the same thing? If so are there potentional problems if they are not using sessions.

    That problem has lead me here looking for a hosting site which offers safe_mode off. I just want to know if Im heading in the right track of learning PHP correctly. I just realise that tables are kinda bad. after reading and understanding what CSS can offer for layouts I just hope I dont learn PHP the wrong way.

    Any insight from experience php coders apprecited ^^


  15. Hi, I am currently playing this game atm. I've been playing it for about 3 years now. It is a great game if you enjoy hard challenges and the rewards that come with it. The battle system is in real time since you are playing an online game with others. This is probably by far the most difficult MMORPG I have played mainly because the End Game events require alot of people in your alliance to fight and defeat Gods / Notorious Monsters (which drop all the good stuff like armor and weapons). Some items/weapons are easier to obtain than others. To give you an idea of how hard some items can be a "Relic Weapon" for a specific class i.e a Great Axe for a Warrior class which unlocks that classes "Final Weapon Skill(Special attack that does alot of damage and looks amazning)" takes around 2-3 years of playing to obtain. Only a handful of people on each server have them. You could cheat of course and buy online currency to speed up the process but thats just lame. We do have problems online with RMT (real money traders) selling gil for real money to players. They monopolize certain monsters which drop valuable items which sell for a considerable profit. Square enix do get rid of these RMT when they can but there will always be RMT in any online gaming. Because alot of harder end game events require alot of organized players to beat. You rely so much on other people for assistance and you will be doing the same helping out others and making friends who will help you in return. You cant really do any fun events untill you max out your level which is level 75 in the game. That would usally take you 2-3 months including completing certain quests along the way. When i say fun Im talking about events i find fun. Square enix is always adding expansion and content I cant keep up to all the new things they've added. I guess you should just try it out for a month. You could find it fun and make some friends in there. during my playtime on my server there has been many friends i've made who quit because the game just takes too long. There are still new people joining still so I guess this game is still going to be around (active for a while).

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.