-
Content Count
958 -
Joined
-
Last visited
-
Days Won
5
Everything posted by sonesay
-
Hi all. I'm working on a page that outputs a list of submited applications where exisitng members can view the list and submit their vote on each application. echo("<span class='base_header'>Accept</span><input type='radio' name='status' value='accept' />"); echo("<span class='base_header'>Reject</span><input type='radio' name='status' value='reject' />"); echo("<input type='submit' value='Vote' />"); echo("</form>"); echo("</p>"); linenums:0'>// output voting option for each application. echo("<p>"); echo("<form method='post'>"); echo("<span class='base_header'>Accept</span><input type='radio' name='status' value='accept' />"); echo("<span class='base_header'>Reject</span><input type='radio' name='status' value='reject' />"); echo("<input type='submit' value='Vote' />"); echo("</form>"); echo("</p>"); I want to be able to submit to the same page but cant figure out how I am going to do it with the post method and retain the application Id which will be used later to process the vote. I have got around this problem before with using links and using get method but it does give an ugly url extention and I dont want to resort to this. <a href=\"example.php?remove=" . $id . "\"> Remove</a> One advantage that get methods have is you can add additional id info on it like ?remove from above code example. I need someting like that for post method voting section. My question is it is possible to use the post method to submit votes and somehow retain a key for application id that is needed to process the vote. I have not added any names or id to the form because Im not sure which one I could use. heres an screen shot to give you a better idea of what im after. I know I could get around this with only displaying 1 form for each application on its own page then there would be only 1 form to submit but displaying multiple forms is more desirable.
-
I basically have an array that uses characters as keys and has an integer value to it. I have a loop that outputs the list in that array. For each entry I want a a button to remove it. The button will submit the form to another page which contains the script to be able to remove it from the array. The infomation for the keys name is used for the buttons name value. Im not sure how you go about grabbing this information once on the submitted page. heres my code echo("<form name='jobs' action='remove_job.php'>");foreach($jobs as $job_class => $job_level) {echo($job_class . " - " . $job_level . " <input type='submit' name='" . $job_class . "' value='Remove' /> <br />" );}echo("</form>"); when submitted to remove_job.php i get the key + value added onto the url. eg. remove_job.php?job_class=Remove note: job_class on the url would be either class i chose to remove eg. warrior, paladin, ninja.... on yeah some of my job classes have spaces in them for example "White Mage" would be be a potential problem? Notice from rvalkass: Moved to PHP section.
-
Thanks for that awsome example. Javascript is so awsome I need to learn more about it.
-
The problem with creating the fields and then showing them later is they are fix number of fields. What I am after is the user to be able to select their own number of fields limited from 0-16 fields. I Guess since i would only be using 0-16 fields max that method of creating all 16 then showing them later would work. I think having a button to add or remove those additional input fields is what I am after. Is it possible? Also after being submitted I would need to retain and show what the user submitted in the confirm.php before being processed into the database.If its not too much trouble I would like to see both your examples so I can decide which one is more suited to what I want. Thanks for your help guys.
-
Unofficial Trap17 Hosted Members Directory
sonesay replied to turbopowerdmaxsteel's topic in Programming
looks pretty neat. Its taking awhile to fully load for me. What do you use to make this? -
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.
-
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.
-
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.
-
I think it can be either way depending on your preference and of those working on the project with you. There are cases where I find having all the code in one file good and others where it becomes too clutered so I would seperate them.
-
Yeah Jihaslip thats the desired effect but I dont like frames(or fame effect) . 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!
-
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.
-
Your site is awsome man. I love the comics they must of taken alot of time and effort to create. Can i ask waht kind of program or tools you use to create those?
-
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.
-
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.
-
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...
-
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.
-
Your myspace page dont work :E https://myspace.com/browser. What kind of music does your group play?
-
Php Date() Problem [resolved] date() seems to loop same ninute.
sonesay replied to sonesay's topic in Programming
Thanks XAMMP is very easy to install, now I can get back to building my site ^^ -
Php Date() Problem [resolved] date() seems to loop same ninute.
sonesay replied to sonesay's topic in Programming
thanks for info on changing the time zones. there is the other problem with it was it keep repeating the same minute. 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. -
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. ......... 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.
-
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?
-
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 ^^
-
I see the problem it looks funny when the actual tables of the forum are adjusting when you drag the browser window smaller. it seems to be set at like 100% width or something. I think what your looking for is a way to assign it a fix minimal width?