Jump to content

redbullmarky

Staff Alumni
  • Posts

    2,863
  • Joined

  • Last visited

    Never

Everything posted by redbullmarky

  1. that would suggest that $checkboxarray3 is not an array, so backtracking a bit it also could mean $_POST['delid'] is not an array either. if 'delid' is a group of checkboxes, as with your other example, make sure you've got them set up with the [] as before <input name="delid[]" etc etc etc it could also mean that the condition you're checking for here: [code] if ($del) {    $checkboxarray3 = $_POST['delid']; [/code] is not actually being met, which is the most likely answer considering i can't see where $del is being set in the first place. with the above code, basically you're saying that if $del is 'true' or a non-zero value, set up the $checkbox3array and then do a 'foreach' on it. but if $del is false or a zero value, then you dont set up the array but run the foreach anyway. hope that helps cheers Mark
  2. using regular expressions, you could probably do it in just one line. have a look at preg_split: [a href=\"http://uk2.php.net/preg_split\" target=\"_blank\"]http://uk2.php.net/preg_split[/a] cheers Mark
  3. [!--quoteo(post=373746:date=May 14 2006, 04:00 PM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ May 14 2006, 04:00 PM) [snapback]373746[/snapback][/div][div class=\'quotemain\'][!--quotec--] I only have problems in ie, but not as many as that opera. [/quote] if anything - getting your site working properly in opera (pc+mac) and Safari (mac) is a testament to your ability to code correct, valid (w3c) code. it's not like they requre botched up workarounds like some other browsers do to get things working as they should be.
  4. you need: [code] mysql_connect('localhost',$name,$lock); [/code] and for your second question you just need to use 'header' to redirect the browser, providing that nothing has up to that point been output: [code] header("Location: http://mypage.com/user.htm?name=$user&pass=true"); exit; [/code]
  5. [!--quoteo(post=373721:date=May 14 2006, 01:57 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ May 14 2006, 01:57 PM) [snapback]373721[/snapback][/div][div class=\'quotemain\'][!--quotec--] When all else fails ... if this works I'll claim someone else posted it because I never use spacer gifs [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] [code]<table width="500" border="1">    <tr>       <th colspan="2">Title</th>       <th width="100">View All</th>    </tr>    <tr>        <td width="75">Item 1</td>        <td colspan="2">Details for item 1</td>    </tr> <!--spacer.gif - AAARRRGGH-> <tr> <td><img src="spacer.gif" height="1" width="75" alt=""></td> <td><img src="spacer.gif" height="1" width="325" alt=""></td> <td><img src="spacer.gif" height="1" width="100" alt=""></td> </tr> <!--end horrid work-around--> </table>[/code] [/quote] funnily enough my workaround was similar, but this looks abit better to be honest until i find another way... i actually had a table footer with <tfoot id="colspanfix"> containing 3 <td>'s and javascript set it's height to 0 and its overflow to hidden if on FF, and that set it's 'display' property to 'hidden' if on other browsers. it worked, but this way you've shown seems alot more practical. i'll give it a go and see how it goes - cheers Andy! if anyone knows if this is a know FF bug tho, please let me know cheers Mark
  6. [!--quoteo(post=373723:date=May 14 2006, 02:02 PM:name=Php Man)--][div class=\'quotetop\']QUOTE(Php Man @ May 14 2006, 02:02 PM) [snapback]373723[/snapback][/div][div class=\'quotemain\'][!--quotec--] Oh, I have horrible knowledge of arrays, but thats about it. Rofl, So all i use is the Example you provided me Above and just tweak it to fit my needs and that should work? [/quote] the principles i showed you should set you on your way. all you've got to remember is that array is nothing more than a group of variables grouped together with a common name. look at [a href=\"http://www.php.net/foreach\" target=\"_blank\"]http://www.php.net/foreach[/a] to get an idea of not just the 'foreach' command, but arrays in general. for something like what you appear to be doing, arrays of some form are going to be essential.
  7. [!--quoteo(post=373713:date=May 14 2006, 01:09 PM:name=Php Man)--][div class=\'quotetop\']QUOTE(Php Man @ May 14 2006, 01:09 PM) [snapback]373713[/snapback][/div][div class=\'quotemain\'][!--quotec--] Well, now im kind of lost, You say i need to process each Array element. Well what im using this for is a MMORPG, and there could be 100 users, Does this mean id have to have 100 lines of this code? I also dont understand the $value part. Where is it pulling this from? QUICK EDIT: Is it pulling the $value variable from the HTML value="<? print "$wep[ID]"; ?>"? [/quote] well put it this way. if you didnt have the [], you'd have to give each checkbox a different name, which would mean you'd have to process an unknown quantity of various variable names - eg $_POST['remove1'], $_POST['remove2'], etc, etc. not very dynamic. however - giving it the brackets [], you can give a group of checkboxes a single name and process them much easier. in my example, 'foreach' goes through each element of an array (automatic loop) and puts the value in $value, for easy reference. what my example does is builds up the query bit by bit - so you'll end up with something like: "DELETE FROM USERS WHERE username = 'thisuser' OR username = 'thatuser' etc etc". if you understand how arrays work, then all you need to know is that using the [] brackets forces a group of values into an array. in your case, you have an array called $_POST['remove'] where each element contains the VALUE of the checkbox that was checked.
  8. that's because you have to treat an array as such. [code] $test = array('a', 'b', 'c'); echo $test; // output is 'Array' echo $test[1]; // output is 'b' print_r($test); // output is the full array [/code] so you need to go through each of your array elements and process them, for example: [code] $sql = "delete from users where "; $checkboxarray = $_POST['remove']; foreach ($checkboxarray as $value) {    $sql.= "username = '$value' OR "; } [/code] that should give you an idea cheers Mark
  9. if you have a group of checkboxes, then using the [] is a way to keep all of the posted results in the same place, ie an array. so in php after submitting the form, you will have a $_POST or $_GET array containing the values of the checkbox: [code] $checkboxarray = $_POST['remove']; [/code] hope that helps.
  10. hi you either don't have php installed on your server or it is installed incorrectly. try out this: [code] <?php php info(); ?> [/code] ([b]nb[/b]: take the space out of php and info in the code above so that it's one word - phpfreaks forum wouldnt let me post it as it was sposed to be) if it works, i was wrong. if it doesnt, then you need to install php correctly. cheers Mark
  11. [!--quoteo(post=373703:date=May 14 2006, 12:20 PM:name=feri_soft)--][div class=\'quotetop\']QUOTE(feri_soft @ May 14 2006, 12:20 PM) [snapback]373703[/snapback][/div][div class=\'quotemain\'][!--quotec--] I saw some information that says may be there are some errors which the editor made without showing them but i try the portal at home same php version same mysql and no error. upload again again error [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] [/quote] without being rude or fobbing you off, read the sticky at the top of both 'PHP Help' and 'PHP Newbie' help forums ('Do You Have SESSION/HEADER Problems?'). this question has been asked time and time again and the causes/solutions are always the same cheers Mark
  12. i think in some ways, maybe some of these answers are overcomplicating things a little. sure, AI in its sci-fi sense is a complicated subject, but on a simple level, even an 'if/else' or 'switch' statement in php is a form of artificial intelligence - making decisions depending on certain factors. google itself is also a form of AI - you give it a suggestion, and not only does it search for what you want but also tries to organise results in terms of relevence. it really depends on how complicated you're looking to make things. if it's more simple stuff like search engine type stuff, then fine - that'd be easy enough. however, if it's full blown stuff like you'd see in some games, then PHP really isnt the right language. in theory - yes it's more than possible. but in practice, it would be very slow due to the way php code is structured and due to the fact that PHP is scripting language , where as what YOU would need is compiled, optimised standalone code. hope that helps Cheers Mark
  13. ok i tried your suggestion - didnt work. seemed the 100% had priority over my fixed widths. so i changed it and set the width of the table to 500, and the column widths on the two rows to 450 and 50 and 50 and 450 respectively - that didnt work either. i have now tried this on FF on my mac (1.5) as well as Camino also on my Mac - both variations of the same browser - and yep, same problem on both. However, Safari, Opera and even the lowly-why-did-they-even-bother IE5.2, all on the mac, display it exactly how i want it. here's the simple code: [a href=\"http://www.thedinnertimes.com/_tests/tabletest.php\" target=\"_blank\"]http://www.thedinnertimes.com/_tests/tabletest.php[/a] cheers
  14. hi andy i'll give your 100% suggestion a go and report back. in terms of your first question though - yes, the same happens when using TD instead of TH. anyway i'll let you know cheers Mark
  15. hi nothing special here - create your canvas using 'imagecreatefromjpeg' or 'imagecreatefromgif' instead of 'imagecreate' or 'imagecreatetruecolor'. then you just lay down whatever you want just as normal. for example: [code] $im = imagecreatefromjpeg("myfile.jpg"); $red = imagecolorallocate($im, 255,0,0); imagerectangle($im, 20,20,120,120, $red); ...etc... ...etc... [/code] hope that helps Cheers Mark
  16. [!--quoteo(post=373336:date=May 12 2006, 11:13 PM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ May 12 2006, 11:13 PM) [snapback]373336[/snapback][/div][div class=\'quotemain\'][!--quotec--] I am having a severe problem with opera, I recently started visually testing my websites in the newest versions of internet explorer, firefox, netscape, and opera. With the help of 1 css hack, I found no other way around, I was able to fix all the problems in the first 3 but opera has a huge alignment problem, I was using floating divs, and it has a huge chunk of the content inside the logo. I am yet to find a solution if I find one I will try and help. [/quote] lovely, cheers. floating divs though i can understand as they work independantly of eachother. but tables - surely tables shouldn't be spitting out these issues without css hacks? it's not like i'm really doing anything overly complex here either. just a simple use of 'colspan'. also very surprised that opera is giving you problems. i've actually found that (like safari on the mac) it sticks to the 'proper' rules, so if your code is clean and validates, opera shouldnt be messing you around like that. cheers Mark
  17. [!--quoteo(post=373306:date=May 12 2006, 09:22 PM:name=Prismatic)--][div class=\'quotetop\']QUOTE(Prismatic @ May 12 2006, 09:22 PM) [snapback]373306[/snapback][/div][div class=\'quotemain\'][!--quotec--] I highly recommend Simple Machines Forum, I use it for my clan site :) [a href=\"http://www.simplemachines.org/\" target=\"_blank\"]http://www.simplemachines.org/[/a] Converters can be found here: [a href=\"http://www.simplemachines.org/community/index.php?board=20.0\" target=\"_blank\"]http://www.simplemachines.org/community/index.php?board=20.0[/a] [/quote] definitely a good shout, there. i've personally toyed around a little with this one and have found it to be alot cleaner than most out there. otherwise, it generally depends. obviously the IPB phpfreaks uses is not a 'clean' install is it? surely these custom mods (advertising popups, solved button, etc, etc) take their toll after a while. IPB isnt that bad, surely? Anyway, welcome back Eric and phpfreaks! Cheers Mark
  18. hi all i'm currently using FF 1.5 and recently noticed a problem whilst testing a page across browsers. basically i used the colspan attribute of a table as i had a header with two columns and the rows with two columns, only the columns were supposed to be independant. [code] <table width="500">    <tr>       <th colspan="2">Title</th>       <th width="100">View All</th>    </tr>    <tr>        <td width="75">Item 1</td>        <td colspan="2">Details for item 1</td>    </tr> </table> [/code] and the idea was to draw, which worked fine in Opera, IE6, Safari, etc: +===========+=====+ +--------------------+------------+ +--------------------+------------+ +=================+ +-------+-------------------------+ +-------+-------------------------+ +=================+ but on firefox, the result was: +========+========+ +--------------+------------------+ +--------------+------------------+ +=================+ +--------------+------------------+ +--------------+------------------+ +=================+ has anyone else had this problem? any solutions? i've tried using fixed widths for all TD's, tried using CSS width instead of table properties' width, etc, but all to no avail. Cheers Mark
  19. [!--quoteo(post=371574:date=May 5 2006, 04:25 PM:name=SharkBait)--][div class=\'quotetop\']QUOTE(SharkBait @ May 5 2006, 04:25 PM) [snapback]371574[/snapback][/div][div class=\'quotemain\'][!--quotec--] I like it though I only glanced over it quickly ;) [/quote] yeah new one is better. old one just feels cramped. i'll go with what's been said already - only thing to add for now is i'd suggest removing the underlined links in your dropdown menu. a simple 'text-decoration' in your css/style defs should sort it out. cheers Mark
  20. [!--quoteo(post=370973:date=May 3 2006, 06:56 PM:name=Pawn)--][div class=\'quotetop\']QUOTE(Pawn @ May 3 2006, 06:56 PM) [snapback]370973[/snapback][/div][div class=\'quotemain\'][!--quotec--] That said, some bored afternoon I may just sit down and pander to IE's illiteracy. [/quote] no offence, but it's not exactly an overly complex site, so for it not to work in IE would be your fault and not IE's. Agreed, IE is rubbish in comparison to the rest but you can't discount the fact that it's still the worldwide browser of choice for most. If it was a complex site, then maybe - but it's simple enough not to require those features that struggle across browsers. When someone views your site and it's all over the place, people actually blame you and your coding, not Internet Explorer.
  21. ok i'm assuming i'm not seeing the same as what others did yesterday, as all i can see is a picture of a CD and a couple of buildings. so going by what was said: 1, sod photoshop and fireworks for now. get a pen and paper and draw it. i'm sure you've heard all the stuff about the left/right side of your brain - designing something (creativity) with something you're rusty with like photoshop (technical) will just hamper your progress. your left hand and right hand side of the brain work very badly together in unison - so dont try learning and being creative at the same time. it wont work, even if youre really special. 2, planning your entire site around a logo IMO is a very very very bad idea. ok, so maybe the colourscheme, etc, is ok, but otherwise - nope. 3, whilst it's a showcase for your skills, i feel that trying to use everything you possibly know is a bad idea. as with everything creative - painting, writing music, web design, etc, - you need to add things that are necessary to the feel of things. the problem with 90's sites was that people tried to use everything - all the fonts, all the colours, all the animated gifs (GRR), all the retro backgrounds, stats and sitecounters, etc,etc. keep it simple. first thing i ever work on on a site is the colour scheme. sod the pictures, they can be easily rectified later, but the colours will set the mood and feel. i'll literally spend days on a site layout, just drawing things and throwing things together and moving things around, etc, etc, before i even consider putting javascript/php/html into it. pick 4 or 5 colours that work well together, set up your CSS, and built it around that instead. cheers Mark
  22. the closest 'mainstream' browser to safari i can recommend on the PC for testing is Opera, mainly because they're both extremely standards compliant. Apart from styling Submit buttons, etc (safari seems to default to the normal buttons), Safari seems to render pages perfectly. I can normally safely assume that if it works on Opera on my PC, it'll work perfectly on Safari on my Mac, and vice versa.
  23. [!--quoteo(post=370691:date=May 2 2006, 09:17 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 2 2006, 09:17 PM) [snapback]370691[/snapback][/div][div class=\'quotemain\'][!--quotec--] I had to get slammed down a few times before I realized that I had to do a ton of research on my own to really get what I want [/quote] "You have to keep pissing in the wind to learn how to keep your shoes dry." businessman - you've definitely shown the passion to learn, and for that you cannot be faulted. my only common suggestion, along with many others, has been that you can't actually learn properly without actually getting stuck in. Screw the learning for now - try it out. Knowledge is best, IMO, learnt in stages. Once you've learnt all there is to know, it wont take long before youre bored and looking for something else, in which case you've wasted all your time. ober is right also - once you have one or two languages under your belt (which you already have), the others really arent that hard at all if you remember the basic principles, etc. I personally learnt BASIC on a rubber-keyed ZX Spectrum typing crap out of books. I learnt Pascal at college with a bit of C++, and never got into web stuff until about a year and half ago. There's a reason why you see the 'Hello World' script all over the place - simply cos it's the best and most common starting point for any language you learn. Don't overcomplicate things. In the short time I've been coding, succeeding and failing, I've picked up some pretty good projects that have all been delivered without any issues whatsoever. Had i not just got stuck in though, I don't think i could honestly say i would have been able to pull them off. Take it on the chin, as you'll quickly realise that the not-so-nicey-nicey comments by chaps like ober are actually the most helpful. Cheers Mark
  24. i actually like the style alot... it is a breath of fresh air when people decide to "dumb down" the technology instead of adding tonnes and tonnes of unnecessary bells and whistles like flash, etc. makes it very clear and easy to read. if all you wanted was retro, geeky and easy to use, then youve achieved that. my only gripes (that i saw): 1, for such a simple layout, you really should get it validating - [a href=\"http://validator.w3.org/check?uri=http%3A%2F%2Fwww.superlatenight.com%2Findex.htm&charset=%28detect+automatically%29&doctype=Inline\" target=\"_blank\"]Invalid Home Page[/a] 2, i still don't have a clue what your site is about. a brief introduction on the homepage would be useful 3, would be nice to see some images throughout the content articles. 4, your links on the homepage clash far too much with the surrounding text. ideally you'll need to make these alot more contrasting so i can see them. 5, can you make the top logo a link to the homepage? whilst you have 'home' in your navigation, being able to get home by clicking the banner/logo is just kind of what people seem to expect. i'm going to assume that you've got lots more to add to the site (as two links in the nav are dead - text & img) so i'm pretty sure that with a bit of care and attention you'll have a nice result. cheers Mark
  25. [!--quoteo(post=368198:date=Apr 25 2006, 12:22 AM:name=harvest)--][div class=\'quotetop\']QUOTE(harvest @ Apr 25 2006, 12:22 AM) [snapback]368198[/snapback][/div][div class=\'quotemain\'][!--quotec--] Thanks for the feedback. I will take on board what you said. The purple came about because it relates to the product being sold, being that it is purple. It was also requested by the company that this be the colour for the navigation. Is there anything good about the site, You have pointed out the bad which is very helpful, but still not sure what you think is good about the site. Cheers. [/quote] your content area bits are neat and laid out well enough. it's just the surrounding areas like the nav, logo, etc, that needs work. if purple is the colour youre theming it around, then maybe purple use a little more than just the nav would be better. it's been said before - it needs containment, just to give all the elements a 'home' to live - elements floating in a sea of whitespace look a little lost and segregated, when they should all be pulling together to form your site. the site as a whole is ok, but if you take on board some of what's been said before and apply a few other minor licks of paint afterwards, you'll have something definitely worthwhile. definitely not bad though. cheers Mark
×
×
  • 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.