- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Massive Evertonian, Love all things Blue. Hate All things Red
- Interests
- Social Media,Internet,Marketing,SEO
33 Posted Topics
Hi Everyone, I am trying to write text to a image and I would like to save that image as a new file with the text in place. I have been doing some google'ing and testing but im getting confused a wee bit. The two scripts I have found both … | |
Hi Everyone, I am trying to get to grips with php prepared statements, I am getting there slowly... My question is how do I ge the last insert ID from the following. if ($stmt = $mysqli->prepare("INSERT INTO tbl_name (value1, value2, value3, value4, value5, value6, value7) values (?, ?, ?, ?, … ![]() | |
Hi, I am trying to update a simple mysql query using PHP PDO The simple query read $query = mysql_query("SELECT * FROM tbl_name WHERE oauth_provider = 'twitter' AND oauth_uid = ". $user_info->id); My PHP PDO query reads $STM = $dbh->prepare('SELECT * FROM tbl_name WHERE oauth_provider = :op AND oauth_uid = … | |
Hi Everyone, I am trying to create a twitter login app, I have the app created and I can log into my app, But what I would like to do is create a number of session virables so I can use the information in my app. When a user authenticates … | |
Hi, I am trying to get the records out of a mysql database where the time is less than todays date and time - I have set the column as DateTime in mysql and it is stored as 2014-05-31 15:00:00 $TodayDate = date('Y-m-d H:i:s', time()+28800); $sttTodayDate=strtotime($TodayDate); // We Will prepare … | |
I have been looking around the web today to see how I could get a list of followers from twitter. Apart of the code is - $tweet->get('followers/ids', array('screen_name' => 'YOUR-SCREEN-NAME-USER', 'cursor' => 9999999999)); My Question is, How do I create a loop to display "Screen_name" of all my followers ![]() | |
I am trying to edit the following script to generate a unique time between 00:00:01 and 01:30:00 Using the following script. $start = new Datetime('00:00:01'); $end = new Datetime('01:30:00'); $randomTime = function (DateTime $start, DateTime $end, $resolution = 1) { if ($resolution instanceof DateInterval) { $interval = $resolution; $resolution = … | |
Hi Everyone, get a really strange problem I have been trying to fix for a few days now and I am unable to get it working. I have the following script as update.php file if (isset($_GET['tx'])) { $tx = $_GET['tx']; // collect all parameters herer $request = print_r($_REQUEST, true); $sqlcode … | |
Hi Everyone, I have been trying to work out how to add 20% vat to a total in php, but for some reason I am unable to. I have been using the following code, but I keep getting the same price for price_with_vat as I do for price_without_vat // price … | |
Hi Everyone, I have a strange problem with how my content is being displayed, I keep seeing \'s throughout my content that is being displayed from my database. I have tried the following but none seem to be helping me. $ball = htmlspecialchars($row->twh_ball); $ball = str_replace("`", "", $ball); $ball = … ![]() | |
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at index.php:3) index.php on line 3 I have tried this a number of ways but I am unable to fix this <?php ob_start(); session_start(); And this <?php session_start(); ob_start(); And like this <? ob_start(); ?> <?php … | |
Hi Everyone, I have been trying to find out what the problem is with this foreach but I am unable to... Is there anyone who can me please foreach($results as $row); $dbcansecurecode = $row['securecode']; $dbcanactivated = $row['activated']; $dbcanpwdreset = $row['pwdreset']; I have echo'd the results out for the foreach but … | |
Hi Everyone... I have the following php to check against two vars... $minute & $second I am making a new var out of the above $fgt = $minute. "" .$second; if((strstr($fgt,"45:00"))) { $hint = 'Error'; registerError( $hint, $hint, $error_title, '<h3>Error - Goal Time Can Not Be Greater Than <strong>(45:00)</strong></h3>' ); … | |
Hi Everyone, I am looking for some help with a htaccess rewrite rule. At the moment I have RewriteRule ^(.+)$ /profile.php?slug=$1 [QSA,L] As one rewrite rule in my htaccess file, this works as expected and rewrites my url to domain/user-name (profile.php is in my root domain) What I am trying … | |
I have a quick question please Ladies & Gents if you dont mind, When I am displaying my data on page I sometimes use nl2br to help with the output format. $cpstatement = nl2br($cpstatement); On one of my query results that I echo out has {$row->duties} - This allows me … | |
Hi Everyone, I am struggling to fix this stupid problem I have with pdo php insert. I have this working on a different insert, but for some reason, this is just not working. I keep getting the error "You have an error in your SQL syntax; check the manual that … | |
Hi Everyone, I have the following script to search for and display the CountryId (code) of a given country name. $stmt = $conn->query('SELECT CountryId FROM countries WHERE Country = ".$clcountry." '); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo $row['CountryId']; //etc... } I have tried the above with '.$clcountry.' and with $clcountry - … | |
Hi everyone, I am looking for someone to help me with a htaccess file / rewrite rule I am working with. At the moment, my url is website/profile?id=12345678 now before I add the htaccess file, the webpage gets the id from the url and searches the database and retrieves the … | |
Hi Everyone, I am new to PDO PHP - I am getting to grips with the insert statements with bind_param. What I am a bit confused about is how to update a table where id = $var I have an image upload script that works fine, as it uploads the … | |
Hi Everyone, I am using the following slugify script and would like to concatenate two php variables. The two variables I would like to concatenate are $firstname & $surname. The end result should be firstname-surname. function slugify($text) { // replace non letter or digits by - $text = preg_replace('~[^\\pL\d]+~u', '-', … | |
This is driving me nuts... I am new to wordpress plugin development... I have got the basic plugin developed. Added my admin menus... What I am trying to do is add a banner image to each options page inside the plugin dashbaord. i'v tried the usual ../images/imagename.png and ./imagename.png but … | |
Hi Everyone. I am trying to add a pagination.class.php to my wp plugin options page using include(ABSPATH.'/includes/pagination.class.php'); But I am getting an error... Saying the file does not exists. When I view the source, the file location is website/includes/pagination.class.php How do I set this to be the plugin directory ? | |
Re: @LastMitch - Thanks for replying but that never helped. I know how to add css and js files to help with style and functionality of my plugin. But what I am looking for is to include .php files into my plugin options page when logged in as administrator in wp … | |
Hi Everyone, I am needing some help with a wordpress insert query. I have this update query $qry ="UPDATE `".$wpdb->prefix."comments_real` SET `comment_country` = '$country',`comment_number` = '$phone',`comment_smvcode` = '$ref' WHERE `wp_comments`.`comment_ID` =$comment_id"; how do I change this to insert a new record in a db table called "comments_real" Thanks in advance | |
Hi Everyone. Got a problem with a wp comment form plugin I am trying to design. I have created a wp comments form plugin that adds to additional fields to the main comment form in worpdress. This has been created using the default twentyeleven theme. The pluing consists of two … | |
Hi Everyone, Especially those who are more experienced than others. I have been teaching myself php over the last 18 months and whilst I can do what I think are basic tasks, the more difficult tasks, well, are more difficult and take much longer to complete. The reason for my … | |
Hi Everyone, I am trying to add a php post variable to one of my output error messages. The working error message is this - registerError( $hint, $hint, $error_title, ' + sign not required. International dialing code not required' ); What I would like to do is to display the … | |
Hi Everyone. I have the following preg_match to check user passwords contain elseif (!preg_match( "((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,15})",$bpwd ) ) { 1 Upper Case Letter 1 lower case letter 1 number It works as described, but what I am looking to do is to create a stronger password requirement. I would like to … | |
Hi everyone, I have a website that gives me the following url when viewing a users profile. website.com/index.php?a=profile&u=username I am trying to create a htaccess rule that will generate a friendly url like website.com/username The existing htaccess file is RewriteEngine on RewriteCond %{request_filename} -f RewriteRule ^(.*) $1 [L] RewriteRule ^([a-z]+)(/([^/]{0,32})(/.+)?)?$ … | |
Hi Everyone. A real noob question here, Sorry in advance. I have found a php function online - public function ft_xss($str, $charset = 'ISO-8859-1') { /* * Remove Null Characters * * This prevents sandwiching null characters * between ascii characters, like Java\0script. * */ $str = preg_replace('/\0+/', '', $str); … | |
Hi Everyone... I have been digging around the web for the last two days trying to fix this problem myself, but have come to the realization that I need some help. I have a mysql query that selects all country names from my country db, (works as described) I then … | |
Hi Everyone. I have the follwing htaccess file working just great. Basically it rewrites .php to .html and also rewrites none www. urls to www. My question is how can is remove a directory from the .php to .html rewrite rule? My pages are correctly being rewritten to .html files, … | |
Hi Everyone, I am helping a good friend of mine to design a website, but we have got a bit stuck - Hoping someone can help us out. We are trying to add a var from our database into the header location. like this - header( "Location: resend.php?activate=$mobnumid"); Here is … |
The End.