tinker
-
Posts
328 -
Joined
-
Last visited
Never
Posts posted by tinker
-
-
OMG, and all my tests are copied and amended from the original, love it!
Cheers!
-
Hi, for some reason I turn on today and i'm getting:
Fatal error: Call to undefined function stripslahes() ...
It normally works, but not today, and it's the same for addslashes...
Any ideas?
-
The javascript, in the error console...
(I've already read that, i'm looking for an answer!)
-
that what you've shown just remakes the post elements to send back so that PayPal can check nothing was changed during transit and that they actually sent that request.
However what I think you need to do is send through a variable with some kind of reference to what you've stored in your database! Have a look at the variable reference list to see what your allowed to send, 'invoice' might be a good choice... Most things that you send will be returned!
-
Hi,
Let's suppose i've got this simple example:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <title>Layer test</title> <style type='text/css'> #test_layer { position: absolute; top: 100px; left: 200px; visibility: visible; background-color: #efefef; } </style> <script type="text/javascript"> function layer_get(id) { return document.getElementById(id).style; } function layer_moveto(x, y, id) { var l = layer_get(id); l.left = x; l.top = y; } </script> </head><body> <div id="test_layer"> This is our test layer </div> <h2>Layers</h2> <a href="#" onclick="layer_moveto(50, 50, 'test_layer')">Move</a><br> <br><br> </body></html>
However because it lacks a full doctype definition it will fall back to quirksmode. However if I use:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
it passes muster with the validator but the script throws error's saying that 'top' and 'left' have been dropped because of a parse error.
So, my questions are, does it really matter that I use the first doctype shown here, how bad is it to fall back to quirksmode (since it's transitional anyway (and I think it falls back to some form of quirksmode anyway)), and is there a way to use a full doctype and the script to work?
-
Consider this:
$x = 6; $y = 7; $z = 8; $a = $x.$y.$z; print ":".$a.":<br>"; if($a !== 678) { print "one<br>"; } else { print "two<br>"; } // AND if($a !== '678') { print "one<br>"; } else { print "two<br>"; }
Be sure of what variables your using, if they are both strings i'd advise using:
if(strcmp($a, $b)!=0)
-
I once followed a tutorial (from linuxquestions I think) on how to setup an answer machine using either mgetty or vgetty. By the looks of it mgetty can call out... if you make any headway can you inform me, i'd be interested in this, also i'll mention our techie hardware guy to see what he thinks...
-
No, i'm not wanting to define a specific color, but make it inherit whatever the links are set to on the page already.
In the end i'll probably write a module level css set for this particular module, but I like to if things are possible. If this is possible I might not have to write a module level set of css though and that'd be a serious bonus...
So, any more suggestions?
-
I have a form which I want to either submit with a link or use a submit button where I can set a different GET to the actions link. If using the button there is the problem of setting the color of the text to the same as the standard links on the page. The solution must NOT use any javascript whatsoever...
<input type='submit' name='UPDATE' style='cursor:pointer; background-color: transparent; border-style: none;' value='Click here to use a different postal address?'>
The reason why I need this is because if I use a link the data already inputted in the form is lost. I can get around the using a different 'action' GET, but without a lot of overhead (or an extra class definition), the colouration of the button is an issue, i'm wanting to do this inline!
For instance is it possible to set the colour along these lines?
<input type='submit' name='UPDATE' style='color: a.link.color; cursor:pointer; background-color: transparent; border-style: none;' value='Click here to use a different postal address?'>
Cheers
-
was that the source of the problem?
-
you probably know it but heres a sub class of link, it gets rid of the decoration, just looks nicer:
.titlebutton:link { color:#b3580e; font-size: 14px; text-decoration: none; font-weight: bold; } .titlebutton:active { color:#b3580e; font-size: 14px; text-decoration: none; font-weight: bold; } .titlebutton:visited { color:#b3580e; font-size: 14px; text-decoration: none; font-weight: bold; } .titlebutton:hover { color:#05b809; font-size: 14px; text-decoration: none; cursor: pointer; font-weight: bold; }
-
Probably a typo, but in tables, fields in the same columns are all relative. On your hidden menu field you reset the 'padding-left', so I just changed to:
<td style="padding-left:20px;white-space:nowrap;"><a href="mail.html?op=view&id=">test</a></td>
and hey presto...
-
Maybe I should just copy the output of my php page and then encrypt it as html....
HTML is a markup language, maybe you could call it an encoding, but definitely not encryption! What your wanting to do is encode your html, I believe you just use hex or octal etc...
-
can you show the code and relevant css? (I don't do external links, sorry)
-
also if I remember correctly the status bar decodes it, so you'll want to sort that if you use it...
as for user's seeing it, goes a little like:
<a href='0177.0000.0000.0001?cmd=%5f%78%63%6c%69%63%6b'>linky</a>
by way this isn't encryption, it's encoding
it is possible to encrypt the GET part of the link totally using whatever algorithm you want but you need to work your protocol out and implement it on both sides...
-
It was a long time ago so I don't remember the actual error, however I had extra blank lines after my closing tags and the server started trippin and I had to delete all extra space and lines, I think that was something to do with 'end'... maybe worth a try?
-
ok, here's a simplistic way to do GET statements...
function encodeit($s) { $s = bin2hex($s); return strrev(chunk_split(strrev($s), 2, "%")); } $link = "https://www.somewhere.org?"; $link .= "cmd=".encodeit("exit")."&";
-
it's not what your after, give me a moment to find that but this might interest you...
Hex: 0x7f.0x00.0x00.0x01 Octal: 0177.0000.0000.0001
try on your local server...
-
why do you check magic quotes and then add slashes, wouldn't the magic quotes bit refer to the filename?
also i'm sure there's a tag in mysql which informs it that your inputting binary data...
-
see cookie solution suggestion here
-
yes the cookie way sounds better than the way i've posted in the js forum...
-
a question for everybody... ever considered donating blood?
-
so an initial development concept is this:
- each menu is numbered
- you could have another field in usersetings, say called menu_memory
- in menu_memory is a delimited list of menu numbers (either indicating open or closed)
How to track menu state?
----------------------------------------------------
1)
Menu states would have to be sent with each page change / update etc. This would probably require JS no matter what, for instance if you were to link from within the page, it too would need to send this intel. Therefore you'd need a new link handler which was sent the link, then the function would harvest the states of the menus, put the in a GET statement and append to the link. This would probably in the correct format for direct saving.
2)
You could set up some kind of ajax feedback on your menu, but you might experience some synchronisation problems (or not). Basically every time a menu state is changed a message is sent back and the db field updated. However if the messages were received out of order a menu could be set to closed when it was actually set to open. The other concern is this adds to the network traffic, because if you've got someone who's not sure where to look for something they open and close like a scoppy diddle, or some people even like to open and close menus as a form of fiddling when bored.
Menu generation
------------------------------------------------------
When creating menu, the menu_memory field is read, then split on the delimiter. As iterate through the creation, need to use say in_array, if true then set to open.
P.S. I hope have you lot's of fun doing this... it'll be something to be proud of when finished...
You never know I or someone else might think of a simpler solution, but it needs to be along these lines just because of the mechanics. But the other thing to be aware of, is unless you use the ajax method (I personally wouldn't), the menu will only reflect the last state, if you know I mean!
-
I could swear I tried this last night...
$replacement = array('\\\\\(', '\\\\\)', '\\\\\-', '\\\\\/');
The big mysql_real_escape_string() drain?
in PHP Coding Help
Posted
During my earlier blunderpus, I got a thinking (when reading manual on ), 'does mysql_real_escape_string() connect to the db everytime it's called?'. Let's say i've a form with 20 elements and I check each one with mysql_real_escape_string(), is that actually making 20 separate connections (albeit small ones). So i'm a thinking that I might use something like the following instead:
Does this fill the correct criteria or not?
Any suggestions, examples, ideas...