I have a file named discussion.php, where a form is located. In this form, a user will enter information, and the information will be posted to savedisc.php. Below is the code for discussion.php:
<form action='savedisc.php' method='post'>
<p>What would you like to discuss?</p>
<textarea name='message' rows='15' cols='40'></textarea>...
I am just trying out PDO and I get this error, Fatal error: Call to a member function fetch() on a non-object, but isn't it already on the $this->db object?
class shoutbox {
private $db;
function __construct($dbname, $username, $password, $host = "localhost" )
{ # db conections
try {
$this->db = new PD...
Hi peeps,
Can anyone have an idea how to convert images to pdf using PHP?
Any response will be appreciated.
Thanks...
...
hey guys,
i wonder what's the easiest way to delete a directory with all it's files in it?
i'm using rmdir(PATH . '/' . $value); to delete a folder. however if there are files inside of it, i simply can't delete it.
regards
...
When an http header is sent by a browser because the url is included in another page is it any different than when it is called by browsing to that page. for example if I have myjavascript.php am I gonna be able to tell if its being viewed by someone browsing to it rather than it being included in a tag?
...
I've configured several headers in the mail() function, sender name and other fields appear as set. But, in the gmail mailed-by field, I see the hostname of my server, even though I've set the Mailed-By header to be different... Is there a way to change this, or am I specifying the wrong header to effect the change?
Current Headers:
F...
I need to increment the number of comments on an Entries Table, the SQL for this would be:
UPDATE entries SET comments = comments + 1 WHERE entry_id = 123;
And i was wondering how to do this using Active Record Class form Code Igniter.
http://codeigniter.com/user_guide/database/active_record.html#update
...
Hi,
I have in my database car incidents for example. These incidents have a latitude and longitude. On a mobile using the GPS, I get the user's location with his coordinates. The user can select a radius that he wants to know if there are incidents around him. So let's say he want to know incidents 2 miles around him.
So I send from th...
Hi all,
I am working on a php application which requires that I extract the dates of the weekends between two dates and then insert them as single records in the mysql database.
I was thinking if there was a simpler way of doing it, rather than going through the loop between start date and end date and for each date checking if date('l...
I'm building a Wordpress theme for a client and it's unlike any other theme I've built before in that the homepage is a collection of posts spread across multiple different containers and styles. It's supposed to look and feel like a magazine in that, at the beginning of each month, 9 different posts are published simultaneously that eac...
I want to be able to make an iphone and android app using php. I have looked at phonegap and appcelerator and it seems like only html and javascript can be used. These frameworks want to make it easy to make apps using web technologies and PHP i would argue is one of the biggest web technologies, but I'm not seeing much (if any) support....
Hi,
i want to display combo box using symfony. In the CountryForm.php i have created widget as :
$this->setWidgets(array('country' => new sfWidgetFormChoice(array('choices' => array()))));
for this validator as:
$this->setValidators(array('country' => new sfValidatorChoice(array('choices' => array(array_keys($countries))))));
I am ge...
How can I convert images to .tiff with php? (im testing on win xp)
I remember I used imagemagick to do this but I cant find the code now, and couldnt find any example on google.
A code sample will be appreciated.
Also, is there a way to do it without imagemagick?
...
This may seem kind of weird.. but I need to evaluate/parse chunks being sent over HTTP with PHP.
It's of note to say that the HTTP stream may never end. Is there any way I can parse chunks as I get them with CURL?
Or do I have to resort to some home-brewed fsockopen() solution?
...
Hi,
I'm trying to draw a real time graph as my mysql table is constantly being inserted with values, like a moving graph referenced from
http://kalanir.blogspot.com/2009/11/how-to-plot-moving-graphs-using-flot.html
The values actually come from a carbon dioxide sensor which updates the value of the table with co2 values with positions i...
hi every one i'am having problem with include/require_once in PHP by which iam accessing a configuration file to connect database.
This problem exists in yahoo small business servers where i hosted my site in a free host it works fine for the same code.
the database connection is working fine but the including of files are not working ...
I'm working on a web application that frequently requires a calculation intense query to be run, the results of which are stored in a separate table. Using MySQL, this query takes about 500ms (as optimized as possible, believe me). To eliminate this bottleneck, I've created a Java program that loads the relevant DB data into memory and...
I use on my website, but I can't figure out how to retrieve the comment count from a comment box with a specific XID.
I've tried intercepting all new comments with the following code:
FB.Event.subscribe('comments.add', function(response) {
alert("Comment was added.");
});
I never receive the alert though. Any ideas? I just need the...
I have a simple PHP upload page that when finished uploading runs a bit of JavaScript to show a form and 'save' button that I enter various bits of info in.
When I upload a large file 100-200mb I find that the upload hangs or seems to hang in that the javascript form never shows up.
Is there a way to set the script execution time for j...
Hai.. i already added javascript validation for my form.Its working fine.But mean while i ve to validate the same form using PHP also.
This is the form code:
class airportclass{
function add_airport_frm(){
$errmsg=0;
<table>
<form action="" method="post" name="airport" >
<tr> <td colspan="2" align="center"><?php echo $err...