Skip to content

Tag: php

Function to count MySQL rows using WHERE

am making function to count rows using “WHERE”, but i get a mysql error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:AppServwwwtesttestindex.php on line 9 Unknown column ‘1’ in ‘where clause’ here is my function i’ve created t…

PHP not working in XAMPP

I have a problem running PHP in XAMPP 1.7.7 for windows. I’ve installed XAMPP in a local server with IIS (changed the port to 81 in httpd.conf as well as other configuration) so far it works and I could connect to the xampp/index.php but coulnd’t run any .php files in my htdocs (shows blank except…

Jquery ajax get request

I am new to jquery and php, I have two input fields, zip and city, the city shall output a value based from the zip that the user input. The jquery script shall call a URL: http://domain.com/city?zip.php=”zip; so that zip.php will return an echo value that will output to the city input field. I tried us…

PHP: Concatenate classes on each other

How can I concatenate a class onto another class in this manner? Keep in mind that I will always know everything in the class that needs to be concatenated ahead of time, so generalization is not an issue. Answer This will concatenate two objects together assuming they’re the same type

keep track of user page view using cookie php

I have this code here: What I’m trying to do is keeping track of the page views the current viewer using cookie. I’m a bit confused with this code because when the web visitor views the webpage for the first time, the result came back saying “Number of views: 0”, when it should be &#82…