I have seen examples like the following: $data = array( ‘username’ => $user->getUsername(), ‘userpass’ => $user->getPassword(), ’email’ => $user->getEmail(), ); However, …
How do I get the base URL with PHP?
I am using XAMPP on Windows Vista. In my development, I have http://127.0.0.1/test_website/. How do I get http://127.0.0.1/test_website/ with PHP? I tried something like these, but none of them worked. Answer Try this: Learn more about the $_SERVER predefined variable. If you plan on using https, you can use …
Can I embed a .png image into an HTML page?
How can I embed a .png file into a blank “file.html” so that when you open that file in any browser you see that image? In this scenario, the image file is not linked to from the HTML, but …
What is a good, free PHP charting suite?
All I will be doing is basic line graphs. Any experiences anyone might share would be greatly appreciated. Answer openflashchart: http://teethgrinder.co.uk/open-flash-chart/ A bit beyond simple line charts. LGPL licensed so it’s commercial friendly. For really simple charts take a look at the jQuery spa…
Getting the record ID just added with mysql prepared statements
I’m inserting a record using PDO and saving the result in $result which I use as a boolean $result = $addRecord->execute(); if ($result){ //add successful } else { //add unsuccessful } I’…
Using PHP as template language
Edit: Great points all around, dedicated templating language is obviously the way to go. Thanks! I wrote up this quick class to do templating via PHP — I was wondering if this is easily exploitable …
phpmyadmin – default to structure instead of browse
Can I set the default in phpMyAdmin to open in structure instead of browse? thanks
select field information with min time value
I thought I was doing the right thing but I keep getting the wrong result. I am trying to simply find the id of the entry with the min time, but I am not getting that entry. $qryuserscount1=”…
How do I display exception errors thrown by Zend framework?
I am working with Zend framework and just hate the fact that I seem to encounter hundreds of exception errors like if I try to reference a non existant property of an object my application just dies …
Creating an XML sitemap with PHP
I’m trying to create a sitemap that will automatically update. I’ve done something similiar with my RSS feed, but this sitemap refuses to work. You can view it live at http://designdeluge.com/sitemap….