You can style around the form and elements, but also add class:class_name and style the class with css: <p align=”left”>[submit class:buttons_mainpage ” “]</p> and then
Read moreCreating a child theme
A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme. Child themes allow you to modify, or
Read moreusing global variables inside a function
I used the global declaration and it works. You have to pass it to the function:
1 2 3 4 5 6 7 8 9 |
<?php $sxml = new SimpleXMLElement('<somexml/>'); function foo($sxml){ $child = $sxml->addChild('child'); } foo($sxml); ?> |
or declare it global:
1 2 3 4 5 6 7 8 9 10 |
<?php $sxml = new SimpleXMLElement('<somexml/>'); function foo(){ global $sxml; $child = $sxml->addChild('child'); } foo(); ?> |
If the variable isn’t
Read morePassing values from PHP to JavaScript / jQuery
1 2 3 4 |
function getTarget() { var targetParam = "<?php echo $_GET['target']; ?>"; alert(targetParam); } |
Remembering form values after submit
Text field: <input type=”text” name=”Fname” value=”<?php echo isset($_POST[‘Fname’]) ? $_POST[‘Fname’] : ” ?>” > Radio button: <input type=”radio” value=”Fvalue” name=”field_name” <?php if(isset($_POST[‘field_name’]) && $_POST[‘field_name’] == ‘Fvalue’)
Read moreSuccess, it’s a mood that you choose with every step
So if you’re not happy right now, what specifically is it that’s missing? What’s the thing (or things) that, if added to your current lot
Read more@ sign in functions
It suppresses error messages: PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that
Read moreCDATA
CDATA – (Unparsed) Character Data The term CDATA is used about text data that should not be parsed by the XML parser. Characters like “<”
Read moreWorking with XML files
http://www.w3schools.com/php/func_simplexml_load_file.asp Built in function to get an object with an XML content. Useful for language independent interfaces.
Read moreHobbies
Homebrewing – beer music – piano,guitar entrepenurship ping-pong child-like experiences – enjoy, no worries, no analysis nature freedom / fishing but without catching fish עבודות
Read moreCSS Display and Visibility
The display property specifies if/how an element is displayed, and the visibility property specifies if an element should be visible or hidden. Box 1 Box
Read moreCSS selectors – advanced
When working with CSS files – remember: Type Selector Select elements by their type A Selects all elements of type A. Type refers to the
Read more!important
It means, essentially, what it says; that ‘this is important, ignore subsequent rules, and any usual specificity issues, apply this rule!’ In normal use a
Read moreTable with background images – round corners with shadow
Code: <style> table td, table th, table tr{ padding:0px;border:0px; } </style> <table cellspacing=”0″ cellpadding=”0″ > <tr><td background=”/ogdan/wp-content/uploads/2014/bg-images/top-left.gif” width=”45″ height=”38″></td><td background=”/ogdan/wp-content/uploads/2014/bg-images/top-center.gif”></td><td background=”/ogdan/wp-content/uploads/2014/bg-images/top-right.gif” width=”45″ height=”38″></td></tr> <tr><td background=”/ogdan/wp-content/uploads/2014/bg-images/middle-left.gif”></td><td
Read moreTools for tracking where competitors advertise
https://www.whatrunswhere.com/features.php http://www.adgooroo.com/for-advertisers/advertiser-features/ http://www.similarweb.com gives you the “not provided keywords” based on 60 million users gathering information. Read this blog post – http://blog.similarweb.com/similarweb-pro-reveals-your-true-traffic-data-with-not-provided-keywords/ http://www.spyfu.com/ well known, somewhat
Read moreCSS content Property
Definition and Usage The content property is used with the :before and :after pseudo-elements, to insert generated content. Example The following example inserts the URL
Read moreMoving A WordPress Website Installation
Moving A Website From A Subdirectory To The Root This is by far the simplest of the three moves I’m going to cover, because you
Read moreRequire vs. include – for _once and for all
Require has to have the file, if not it gives an error. Include – wants the file, gives a warning if it is not there,
Read moreAdvanced CSS selectors
> means “is a child element of“. So body > *:not(.toolbar) matches *:not(.toolbar) that is a child of body. *:not(.toolbar) matches any element that does not have the class .toolbar. *[selected=”true”] matches any element
Read moreGoogle Analytics Custom Variables
Eli – you can define up to 5 free custom variables to use with analytics. You inject values to the variables using code and you
Read morePHP: Send email with all form values/fields
if (isset($_POST[‘Submit’])) { // Prepare message $msg = “Time: ” . date(“d/m/y g:ia”, time()) . “\n”; foreach ($_POST as $field=>$value) { if ($field != “submit”) $msg .= $field . “: ” . $value . “\n”; } if (mail(“EMAIL”, “SUBJECT”, $msg, “From: FROM_NAME <[email protected]>”)) { // Email was sent successfully } else {
Read moreDreamweaver page encoding and new document encoding – set to UTF-8
Modify menu -> Page Properties ->Title/Encoding ->Encoding = UTF-8 Edit ->Preferences -> New Document -> Default encoding
Read morePHP changing table collation (encoding) from latin_swedish (or any other) to UTF-8
<?php $server = “localhost”; $user=”user_details”; $pw=”password”; $db=”111111_database”; mysql_connect(“$server”,”$user”,”$pw”) or die (“could not connect to mysql”); mysql_select_db($db) or die (“could not find Database”); mysql_query(“SET CHARACTER SET
Read moreHiding an element on smaller screens / mobile
Put the element you want to hide into a div with an id=”something” in css use: @media screen and (max-width: 580px) { #something { display:
Read moreCSS Pseudo-elements
CSS pseudo-elements are used to add special effects to some selectors. Syntax The syntax of pseudo-elements: selector:pseudo-element {property:value;} CSS classes can also be used with
Read moreCSS – element.classname
<style> a.ex1:hover,a.ex1:active {color:red;} a.ex2:hover,a.ex2:active {font-size:150%;} a.ex3:hover,a.ex3:active {background:red;} a.ex4:hover,a.ex4:active {font-family:monospace;} a.ex5:visited,a.ex5:link {text-decoration:none;} a.ex5:hover,a.ex5:active {text-decoration:underline;} </style> </head> <body> <p>Mouse over the links to see them change layout.</p>
Read moreCSS – hover, when should it appear… not working at the end of the css file
Hover css must be declared right after normal css definitions for the same element.
Read moreBefore pointing a domain to a new hosting account – hosts file trick + TTL
If there’s a new hosting account but the domain is not pointing to it, or you need the domain to continue pointing to the old
Read moreDealing with a move to a case sensitive server (linux) from a case-insensitive one (windows)
In order to avoid 404 pages showing up for incorrect letter cases, all file names should be lower case and when not matching from an
Read morePHP Associative Arrays
Associative arrays are arrays that use named keys that you assign to them. There are two ways to create an associative array: $age=array(“Peter”=>”35″,”Ben”=>”37″,”Joe”=>”43”); or: $age[‘Peter’]=”35″;
Read more