I was wondering how you can define an array of objects within another object. For example, let's say I have a class called "User", and another class called "Address". A user can list an unlimited number of addresses. How do I do this?
My interactive map markers are XML/PHP based. The marker changes dynamically depending on the time on database compared to current time. Its working when I've set it for hours on the database but when I put both hours and days its not working... any
I'm searching for a solution where a php script called by a cron job is logging me in to facebook and posting a message to my own wall without any browser needed. With a facebook application in combination with the facebook-php-sdk it's easy to do th
I need to display maximum 20 pages and each page has 10 posts that means I need to limit 200 records in MySQL query am using this code. $sql = "SELECT title FROM $tbl_name ORDER BY ID DESC LIMIT 200 $start, $limit"; start and limit is using for
I want to get the checkboxes from a table in a view module, but I can't get it to work. This is the table: <form action="" method="post"> <TABLE id="dt_basic" class="table table-striped table-bordered table-hove
$date = getdate(); $query = "UPDATE Members Set Name = '$desiredName', Latest_Update = '$date' Where ID = '$currentID'"; if(sqlsrv_query($conn, $query)) { echo "Record successfully updated."; } I have this query to update a name of a m
Here's the Problem: On some websites, my code that connects to Twitter is generating a fatal error that stops PHP from running for the rest of the page load. It creates a total page kill. How can I catch this error so that I can simply display zeroes
I would like to create latest post widgets etc like in WordPress on my custom cms any advice where to start would be great --------------Solutions------------- Widgets in WordPress are basically objects that can be "hooked" into particular place
i wanna make a reset button for my analysis page. in this page, there are textfiles included. by clicking on the reset button, i want them to reset the assigned text file. for example: <h4>Analysis</h4> <h5>searchinputs</h5> <in
I would like to know the following: When you type in mysql the following commands: SHOW VARIABLES LIKE 'collation%'; SHOW VARIABLES LIKE 'character_set%'; It returns collation and character, so I configured to let them in UTF8 in this situation. arra
Please I can't copy data from database A to B I have same tables in A & B and same columns too. I want to copy Data from A.profile to B.profile This is my code : ( same pass,user, localhost) mysql_connect($host, $user, $pass)or die("cannot connec
I was wondering if someone could tell me if I am understanding php oop correctly. I have some coding background but not a lot and I am completely new to oop and I don't know anyone that could possibly give me some guidance. 1st Classes With classes y
I created this simple Php example to begin my study. This is Index.html: <!DOCTYPE html> <html> <head> <title>Prova</title> </head> <body> <form action="script.php" method="get"/> <tab
I recently updated the format of URLs on my site, example below: Old URL: www.domain-name.com/article/200/title-of-the-article/ New URL: www.domain-name.com/article/200/2015/05/title-of-the-article/ How can I perfom the redirect in .htaccess to autom
I have a problem wherein i will retrieve several datas in my sql, for example i have 9 datas but my problem is that inside my foreach the data that will be process and the foreach is placed in my controller. here's my controller: function getPhaseDat
I am using CodeIgniter 2.2. I have to update database with +1 every time a page is visited. Code works but it get incremented by +2 every time. Example: if total views=2, once the page is clicked total views should be 3, but the value in the database
This question already has an answer here: PHP Parse/Syntax Errors; and How to solve them? 10 answers I'm trying that my code will output like this with the pre tag: but he give me an error: Parse error: syntax error, unexpected 'echo' (T_ECHO), expec
I have used google api for Analytics service. First 3 days from this implementation, it worked fine, but from 30th Apr 2015. suddenly it got trouble with the following error. I have executed this php program through a web page access by using Apache
I am trying to get results from a mssql database table using PDO in PHP, but it's not returning any results. However, I can count table rows - any advice? //this one working fine return 500 recrod in table $sql = "SELECT count(*) FROM Content";
I have tried to update a site I'm working on for someone and I got the white blank screen during wordpress update. I did not back up... I tried to change the name of the plugins folder as advised by someone but that didn't work. I could be something