small program skipping else clause
In the following program can someone please tell me why my script is skipping the first else clause and never printing "You have already changed your password"? Everything else is working fine but when...
View ArticleGlob is not an array?
Im working on an image slideshow, but glob() is not working. Here is my code: PHP Version: 5.3 <?php $dir = "http://www.harvester.tk/560/img/*.*"; foreach (glob("$dir") as $filename) { echo...
View ArticleTernary Operator ( ? : )
Hi, Just wanted to check with everyone that I am getting the Logic right with the use of the Ternary ? : Operator isset( $Files ) ? isset( $Directories ) ? __DisplayResults__( $Files, $Directories ) :...
View ArticlecURL Error The cookie file could not be opened. Make sure this directory has...
Warning: fopen(cache/9fd1a7615fb950e01f87d7d469874caatxt): failed to open stream: No such file or directory in /htdocs/public/www/rti/rti.curl.class.php on line 54 cURL Error The cookie file could not...
View ArticleRunning Microsoft Speech API console program in PHP
I wrote a simple console program using Microsoft Speech API to generate a .WAV file from a hard-coded text ("Hello world"). If I run the code directly on the console (on the server), it produces a...
View ArticleQuery hierarchy in reverse
In it's simplest form, I have a tree hierarchy in a MySQL database where every section has both a 'sectionID' and a 'parent', both numeric values. My starting point will be an array of sectionID...
View ArticlePHP Values Replacement from Fields
Hello, Below is my code I am using from a Gateway for sending SMS. I have 2 felds Dst_nbr and Message, Now the problem is that how can I get values from fields (Dst_nbr and Message)...
View Articledroplist into function
How do i put this into a function <?PHP $result = $conn->query("select id, bedrijfsnaam from klanten"); echo "<html>"; echo "<body>"; echo "<select name='id'>"; while ($row =...
View ArticleAttempting to understand Win7 Webservice to linux client scenario
I have written the following code as a client on Linux in an attempt to understand how a webservice running on a Windows 7 PC works. <?php $client = new...
View ArticleSubstitution and checking expression
Hi, I have a flash movie that calls a PHP script to send an email. The problem is that sometimes the variable comes like this: "Email:joe@domain.com" How can I check and chop the "Email:" part of the...
View Articleneed clarification on why no error message
Hi can someone tell me why I am not thrown any errors if i upload a file bigger than file size specified in the code. Also it does not throw error if i upload some other extensions instead of images....
View ArticleCall to a member function query() on a non-object
I am writing a function to grab and count how many times a certain value is used in a table but get this error, Fatal error: Call to a member function query() on a non-object in...
View Article[MySQLi PHP] Compare variable to sql row
I am trying to build a shoutcast radio logger. I have it down and working, only my table looks like this I want to have a check to compare the last song to the current song as to not record the same...
View Article'Illegal string offset' in foreach loop
I am getting an assoc array from a MySQL database using PDO. I want to perform a function on it to trim down the number of words by using the following code: $newsContent = Words::truncateWords($rows);...
View ArticleDeprecated error on formmailer
Hello friends - I recently used a pre coded formmailer and adjusted the form content. When I tested the form, it went through but 4 deprecated errors popped up. I have used the formmailer before...
View ArticleC++/delphi socket TCP/IP to PHP - memcpy/move function in php
Hey guys, I need to rewrite a example of sockets TCP/IP communication done in c++ or delphi(have this 2 examples) to PHP, but have a problem with function memcpy(c++)/move(delphi) and with the...
View ArticleStrange problem PHP MySQL
Hello. I have a problem with my website. When I introduce the symbols " or ' through text editor (PHP based), the database adds a / to the code. The problem happens in text, but also in pictures or...
View ArticleWhat does this statement means (<?=) in a tenary operator
I met with the ternary operator statement <p>Values <?= $_POST['submitted'] ? "sorted by {$sortType}" : "unsorted"; ?>:</p> I do understand what the statement mean except the the...
View Articleforeach loop overwriting all values with last key value
I have got an array from a database and I want to change some of the values like using ucwords() etc. The problem is when i run the array through a foreach loop, it overwrites all the values in the...
View Articlephp_network_getaddresses: getaddrinfo failed
Hi there, I've hit a bit of a roadblock on something I've been working on, was wondering if anyone knew of a way to fix the error message: imagecreatefromjpeg():php_network_getaddresses:...
View Article