Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. It shows as <div class="textwidget"><form action="<?php esc_attr_e(wpjb_link_to("search")) ?>" method="GET"> so not parsing the php
  2. if ($_POST['pword'] !== $_POST['pwordcheck']) Is this checking a password in the form to an unhashed password saved from database? Reason I ask is because the $_POST['pword'] isn't hashed until you made it $password $password = strip_tags(password_hash($_POST['pword'], PASSWORD_DEFAULT, $options));
  3. Is the widget you are using capable of parsing php code? You can try something like this and the code below https://wordpress.org/plugins/php-text-widget/ <form action="<?php esc_attr_e(wpjb_link_to("http://www.littlefoxwebdesign.co.uk/etsgroup/jobs"));?>" method="GET"> Keyword: <input type="text" name="query" value="" /><br/> Location: <input type="text" name="location" value="" /></br/> <input type="submit" value="Search" /> </form>
  4. Should write the script that can use header before any output. But can use meta refresh <META http-equiv="refresh" content="0;URL=emailChecker.html">
  5. It seemed fast for me when I tried it. You can try posting your code here, maybe is something that would stand out. Can make an index in mysql http://dev.mysql.com/doc/refman/5.7/en/create-index.html Run explain to see whats going on http://dev.mysql.com/doc/refman/5.7/en/explain.html Check the slow query log http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html
  6. at http://compareandchoose.com.au/hotel the following files do not exist http://compareandchoose.com.au/mega_dropmenu/js/tshCommon.min.js http://compareandchoose.com.au/css/demo.css at http://hotel.compareandchoose.com.au/ they are not being called.
  7. Using their service comes with ads, if you don't want ads then shouldn't use it.
  8. You can detect if daylight savings something like this <?php function daylightSavings() { $date = new DateTime(date('Y-m-d H:i:s') . 'Europe/London'); if ($date->format('I') == "1") { return TRUE; } else { return FALSE; } } //show current time date_default_timezone_set('Europe/London'); $my_date = date('Y-m-d H:i:s'); echo $my_date; echo "<br />"; //show modified time if (daylightSavings()) { $my_date = date('Y-m-d H:i:s', strtotime('+1 hour')); echo $my_date; } ?>
  9. Do you use phpmyadmin at all? It's too hard to tell you an exact command with the little information, can follow this video tutorial which can show where to add it in phpmyadmin. http://www.youtube.com/watch?v=jZ72GCGWPQg If doing direct from command line with mysql: Need to use your values everything that is colored in red. I used VARCHAR(60) as data type because do not know what you need. http://dev.mysql.com/doc/refman/5.7/en/data-types.html mysql -h localhost -u USERNAME -pPASSWORD DATABASENAME; ALTER TABLE `TABLENAME` ADD COLUMN `NEW_COLUMN_NAME` VARCHAR(60) AFTER `AN_EXISTING_COLUMN_NAME`;
  10. Can add js into the form itself like so. <form action="delete.php" method="post" onsubmit="if (! confirm('Delete this user?')) return false;"> <input type="submit" value="Delete User" > </form>
  11. Follow this and can work http://forums.asp.net/t/1546237.aspx?Access+Buttons+from+ParentPage+and+ChildPage+IFRAME+ I tested it using parent.php and child.php as the script names and href source
  12. seeing as how you use the same $thumb variable, this looks like a good place function script_thumb($prefix,$title){ $saved_thmb = get_post_meta( get_the_ID(),'saved_thmb',true); $subPath = tubeace_sub_dir_path(get_the_ID()); $upload_dir = wp_upload_dir(); $thumb_url = $upload_dir[baseurl]."/script-thumbs/".$subPath."/"; if($saved_thmb==1){ $thumb = $thumb_url."/".get_the_ID()."_1.jpg"; } elseif($saved_thmb>1) { $def_thmb = get_post_meta( get_the_ID(),'def_thmb',true); $thumb = $thumb_url."/".get_the_ID()."_".$def_thmb.".jpg"; $rotate_thumbs = "onmouseover=\"thumbStart('$prefix-".get_the_ID()."', $saved_thmb, '$thumb_url');\" onmouseout=\"thumbStop('$prefix-".get_the_ID()."', '$thumb_url', '$def_thmb');\""; } else { return; } if (file_exists($thumb)) { $thumb = "<img class=\"img-responsive\" src=\"$thumb\" $rotate_thumbs id=\"$prefix-".get_the_ID()."\" alt=\"".esc_attr($title)."\">"; return $thumb; } else { return; } }
  13. Thinking about your firefox error tells me that the file extension may have been changed, like gd, imagemagick or whatever does it is doing it incorrectly. But a most likely cause is that the images are just way too large, try optimizing them first.
  14. Make sure get_the_ID() is actually returning an id for each one. Before even using the thumb location...check to see if the image actually exists with file_exists() if (file_exists($thumb)) { $thumb = "<img class=\"img-responsive\" src=\"$thumb\" $rotate_thumbs id=\"$prefix-".get_the_ID()."\" alt=\"".esc_attr($title)."\">"; return $thumb; } else { return; }
  15. http://www.mywebsite.com/wp-content/uploads/script-thumbs/79/7979_5.jpg leads to http://website.1and1.com/
  16. Old code made for an old version of php, You would need to rewrite the script. Change this $instance =& new $object; To this $instance =new $object; The other warning messages: should go away, can not output anything before headers, which in this case was the warning message.
  17. You can include the file and use it the same. <?php include('game.php');?> <html> <head> <title>PHP based example Game - Earth & Wind & Fire (aka Paper-Scissors-Rock)</title> </head> <body> <center> <?php game();?> <div id="game"> <a href="?item=earth">Earth<br /><img src="images/sand.png" width="135" height="135" alt="Earth"></a><br /><a href="?item=wind">Wind<br /><img src="images/wind.png" width="135" height="135" alt="Wind"></a><br /><a href="?item=fire">Fire<br /><img src="images/fire.png" width="135" height="135" alt="Fire"></a><br /></div> </center> </body> </html>
  18. I suppose you can now hide the computer generated number and not place it into the form <html> <body> <?php $x = rand(1, 10); $num = ''; if (isset($_POST['submit'])) { if (isset($_POST['num']) && trim($_POST['num']) != '' && ctype_digit($_POST['num'])) { $num = trim($_POST['num']); if ($num < $x) { echo " Your number is lower! <br />"; } elseif ($num > $x) { echo " Your number is higher! <br />"; } elseif ($num == $x) { echo " Correct! Press Reset to try again! <br />"; } else { echo " You never set a number! <br />"; } } else { echo " Set your number! <br />"; } } ?> <p> <form action="" method="post"> Guess a number: <input type="text" size="4" name="num" value="<?php echo $num; ?>"> <br /> <button type="submit" name="submit">Submit</button> <button href="" onclick="document.forms[0].submit();return false;">Reset</button> </form> </p> </body> </html>
  19. Try this out, you had a lot wrong <html> <body> <?php $x = rand(1, 10); $num = ''; if (isset($_POST['submit'])) { if (isset($_POST['num']) && trim($_POST['num']) != '' && ctype_digit($_POST['num'])) { $num = trim($_POST['num']); if ($num < $x) { echo " Your number is lower! <br />"; } elseif ($num > $x) { echo " Your number is higher! <br />"; } elseif ($num == $x) { echo " Correct! Press Reset to try again! <br />"; } else { echo " You never set a number! <br />"; } } else { echo " Set your number! <br />"; } } ?> <p> <form action="" method="post"> Computer: <input type="text" size="4" name="x" value="<?php echo $x; ?>"> <br /> Your number: <input type="text" size="4" name="num" value="<?php echo $num; ?>"> <br /> <button type="submit" name="submit">Submit</button> <button href="" onclick="document.forms[0].submit();return false;">Reset</button> </form> </p> </body> </html>
  20. <?php function showComponents($items = null) { $pictures = array( "earth" => '<a href="?item=earth">Earth<br /><img src="images/sand.png" width="135" height="135" alt="Earth"></a><br />', "wind" => '<a href="?item=wind">Wind<br /><img src="images/wind.png" width="135" height="135" alt="Wind"></a><br />', "fire" => '<a href="?item=fire">Fire<br /><img src="images/fire.png" width="135" height="135" alt="Fire"></a><br />', ); if ($items == null) : foreach( $pictures as $items => $value ): echo $value; endforeach; else: echo str_replace("?item={$items}", "#", $pictures[$items]); endif; } function game() { if ( isset($_GET['item']) == TRUE ) : $pictures = array('earth','wind','fire'); $playerPic = strtolower($_GET['item']); $computerPic = $pictures[rand(0, 2)]; echo '<div><a href="http://mapswidgets.com/game.php">New game</a></div>'; if (in_array($playerPic, $pictures) == FALSE): echo "Play as either Earth, Wind or Fire."; die; endif; if ( $playerPic == 'fire' && $computerPic == 'wind' OR $playerPic == 'earth' && $computerPic == 'fire' OR $playerPic == 'wind' && $computerPic == 'earth' ): echo '<h2>You Win!</h2>'; endif; if ( $computerPic == 'fire' && $playePic == 'wind' OR $computerPic == 'earth' && $playerPic == 'fire' OR $computerPic == 'wind' && $playerPic == 'earth' ): echo '<h2>Computer wins!</h2>'; endif; if ($playerPic == $computerPic) : echo '<h2>House wins! =)</h2>'; endif; showComponents($playerPic); showComponents($computerPic); else : showComponents(); endif; } ?> <html> <head> <title>PHP based example Game - Earth & Wind & Fire (aka Paper-Scissors-Rock)</title> </head> <body> <center> <?php game();?> <div id="game"> <a href="?item=earth">Earth<br /><img src="images/sand.png" width="135" height="135" alt="Earth"></a><br /><a href="?item=wind">Wind<br /><img src="images/wind.png" width="135" height="135" alt="Wind"></a><br /><a href="?item=fire">Fire<br /><img src="images/fire.png" width="135" height="135" alt="Fire"></a><br /> </div> </center> </body> </html>
  21. <?php function navBar() { echo "NAVIGATION BAR"; } ?>
  22. Your question exceeds the purpose of this forum, it's for helping with someone's existing code, not creating it. There is a freelance section here to hire someone. There will be a few steps into making your form creating the form with your specific parameters, layout and styling when a form is submitted it leads to a script where the form data is processed processing of the data and return a result, this could be connecting to a database,file, sessions,cookies, more code that returns something , etc... Asking for that form is more involved than it appears to be.
  23. Let me explain better. Just because it reads WAMP(windows,apache,mysql,php) does not mean it's wampserver you: easyphp uses php version 5.4.10 cakephp is oop and mvc (advanced,must use cakephp framework, have an idea about classes and objects,create a model,view,controller structure) suggestion: wampserver uses php version 5.5.12 actually learn php coding at php.net and start out using procedural style then move onto oop learn a framework optionally after you feel confident enough, can then decide if actually need all the bloat and to learn a framework cakephp is not the most preferred framework, something like zend or symphony would most likely benefit you more. If you still want to continue with cakephp, I suggest using from cakephp's site and not some random website and code. These actually work, I can attest to the fact because have done them all. http://book.cakephp.org/2.0/en/index.html
  24. Clarkey, on 09 May 2014 - 08:24 AM, said: I have never used the genesis framework so this is just a pure stab in the dark. genesis framework is just a way to create wordpress themes, in the end is all the same wordpress code.
×
×
  • 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.