ToonMariner
Members-
Posts
3,342 -
Joined
-
Last visited
Everything posted by ToonMariner
-
strstr($_POST['formfield'],$word); or preg_match('/' . $word . '/i',$_POST['formfield']) will find it for you (if you are using get instead of post then use $_GET...)
-
I use them for permissions - its exactly the same system used for your dir/file permissions on a server http://www.phpfreaks.com/tutorials/151/0.php
-
you can do it in css - its only ie6 that won't get li:hover try this ul#headerMenu li ul li ul { display: none; } ul#headerMenu li ul li:hover ul { display: block; } sometimes you just have to put the entire cascade of elements in to get it to play ball..
-
indeed filmgod - serverside can go and work all this out for you BUT - its it worth it? the extra processing is IMO pointless when you can just let a browser do its own thing and still look good...
-
here is how I layout a form <form> <fieldset> <legend>YOUR 1st ROW</legend> <label for="text1">Text1:</label> <input type="text" class="textbox" name="text1" id="text1" value="" /> <label for="text2">Text2:</label> <input type="text" class="textbox" name="text2" id="text2" value="" /> <label for="text3">Text3:</label> <input type="text" class="textbox" name="text3" id="text3" value="" /> </fieldset> <fieldset> <legend>YOUR 2nd ROW</legend> <label for="text4">Text4:</label> <input type="text" class="textbox" name="text4" id="text4" value="" /> <label for="text5">Text5:</label> <input type="text" class="textbox" name="text5" id="text5" value="" /> <label for="text6">Text6:</label> <input type="text" class="textbox" name="text6" id="text6" value="" /> </fieldset> </form> now you can allow them to be side by side if the browsers width is sufficient or on top of each other if its not... fieldset { float: left; width: 250px; margin: 5px; } label { float: left; clear: left; width: 80px; } input.textbox { margin-left: 85px; } have a play - i sometimes have a spot of bother with the clear: left on the lables and end up puting a div around label and input just to group them...
-
Prob OK - never bothered with xhtml1 it takes nothing to switch your doc type so have a try with each and see which works for you.
-
you get the noise because your are trying to make a 200px wide image 100px wide. just create a new image that is 100px wide. rendering a web page does not use the same 'magic' that you have in MS word where the image is resized and still maintains a crispness. The web wes designed to pass info all over the shop and to that end jpg's were developed to do this for images - the file saize had to be small as everyone was on dial up etc. SO the web thinks that if you want a small image you would make a small image - it would be stupid to make an image that had a filesize any larger than it has to be....
-
table.tablelist tr:hover td{ background-color:lightyellow; } this won't work in ie6 - for that you will need some js and the onmouseover event handler on the <tr> tag.
-
awwww I'll be nice to you film god... its all about semantic markup. the two examples you gave to assess which were 'better' (and others correctly pointed out neither were 'good') do not actuall MEAN anything. when we read something it is broken up into textual entities that we recognize... think of a typical news paper article A GREAT BIG TITLE - A Sub Title - the article itself.... OK firts two dead easy H1 and H2... the article can hove lots of textual entities. Text that we read 'as a story' is broken up into paragraphs to make it easier for us to read. spot information could be displayed in a bullted list - they are points that we need to know but have no contextual bearing on the 'story'... so look at your content and assess what type if text it is. if its a title of a section give it h1, sub title h2, paragraph p.... and so on a span is used to provide a text holder where you can apply some different display (or aural) rules but has no meaning in terms of changing the actual context of the text in which it sits..... Hope my rant was understood etc etc (had big book for brekkie!)
-
try using xhtml1.1 and drop the table layout. you shoudl refrain from using ANY styling attributes. Put as much style as possible into an external style sheet and if need be use the style attribute of an element only when absolutely neccessary... you will NEVER get sites to be identical on each browser but you can make em look 'very similar'... Good luck.
-
checking a database for a user name
ToonMariner replied to horseatingweeds's topic in PHP Coding Help
I don't bother with the LIMIT 1 part - I do have a check on usernames on registration but just in case it was bypassed (just incase - can't see a flaw but you never know!). If more than one result is returned, I email myself with the details the user entered to get to that portion of the script so I can do some checks, some admin and some cleanups. Always plan for your application failing or doing something you don't expect - then you can improve on what you have done before... -
[SOLVED] Don't understand this error:
ToonMariner replied to LiamProductions's topic in PHP Coding Help
hmmm - check your connection details and try echoing out the query to screen copy and paste it into your phpmyadmin (or similar) to see if the query actually returns any records. -
this is simply a case or creating a query... there are so many permutations but if you read the mysql manual you should get an idea... http://dev.mysql.com/doc/ choose the version you are using - its section 12 you need to look through...
-
nope the best you will get is what you can do with yoru local image manipulation app - like photyshop etc... once something is done - its virtually impossible (unless you are the FBI) to improve the quality.
-
what you need to do is ignore the design for the moment... produce something that 'makes sense' with no styleing at all (as if you were using a text only browser to view the page). THEN use some css to layout the form. The issue of things moving about is the beauty of floats - design so that it looks great at your chosen resolution and still looks like it is structured properly at lower and higher res's.
-
iI have used topstyle for some time and find it a very useful timesaving tool. There is a free lite version but the pro version is worth 'buying' IYKWIM free version http://www.bradsoft.com/topstyle/tslite/index.asp
-
NO! go and learn how to do it with css... the informtion you absorb will enrich your life and make you a better lover...
-
Why do i get this error: Undefined index: filef42 ?
ToonMariner replied to jd2007's topic in PHP Coding Help
may sound daft but is your <input type="image" got the name or id 'filef' ?? -
Congratulations - a 5 gallon bottle of peroxide is winging its way to your door....
-
LOLOL yeah I completely missed the substr bits -- as soon as I saw mktime I just saw red soz mate
-
yes you can have stuff like <p class="red bold"></p> (notice the pace between the two classes css... .red{ color: #f00;} .bold{font-weight: bold;} shoudld provide you with bold red text.
-
Meh well I'm no CSS expert... thats why you are always using %height!!!
-
apparantly that number is not a timestamp dan... so the only solution is to take the string and spilt it up just and a position - so take first 2 digits as day, next 2 as month etc.... this requires that the data is a string and that leading zeros are maintained so that the 'number' is always a uniform length
-
preg_match
-
have you got the correct enctype on your form?