php

php function output ina table row... how?

I want to run this function but show the result in a table row strlen($cat_row['sms'] This is what i came up with but it is not working: echo "<tr><td bgcolor=#626E7A>".**strlen($cat_row['cars']**."</td></tr>"; How do you show result of a php function in a table row? i am trying to format the output some how. please help ...

How do I access a variable defined in URL when using Zend Framework?

I had a read of the documentation, but couldn't see an example of how it would be possible to use the variable in traditional PHP style of $_POST['var'] I'm pretty sure my URL is legit: domain.com/module/controller/action/var/value/ Using the above as an example: $var didn't work $_POST['var'] didn't work How is it done? ...

How to prevent PHP variables from being arrays or objects?

I think that (the title) is the problem I am having. I set up a MySQL connection, I read an XML file, and then I insert those values into a table by looping through the elements. The problem is, instead of inserting only 1 record, sometimes I insert 2 or 3 or 4. It seems to depend on the previous values I have read. I think I am rein...

Ideal post data limit throgh form.

What is the ideal limit for posting the data through the form. ...

[CakePHP] Development of frontend/backend application

hi all, i have to develop frontend/backend application using cakephp. can you give me advice how should i develop them, using same cakephp library? or i have to develop them using separate cakephp libraries? thank you in advance on your answer! ...

What happens if MySQL database wasn't closed?

What happens if MySQL database is not closed? How do we know if it is closed properly? I do have a page which has 11 tables on a page..so what I did is I open database on top of page before script starts and close where the scripts(PHP) ends... the ending is mysql_close($db);...is this fair enough or do I need to give only mysql_close(...

Acces the raw wiki page contents in a Dokuwiki Render Plugin

I created a plugin and its basic functionalities are working well. It returns always testing as you can see in the method document_end(). But how can I access the plain, raw wiki page content? This is my rawcontent.php file in the corresponding plugin folder. ...

How to test if a user has SELECTED a file to upload ?

Hello, on a page, i have : if (!empty($_FILES['logo']['name'])) { $dossier = 'upload/'; $fichier = basename($_FILES['logo']['name']); $taille_maxi = 100000; $taille = filesize($_FILES['logo']['tmp_name']); $extensions = array('.png', '.jpg', '.jpeg'); $extension = strrchr($_FILES['logo...

$.load() is not working in ie

i have the following code; $("#testbtn").live("click", function(){ $("#targetdiv").load("http://localhost/test/test.php"); }); but it is not working in ie but working fine in chrome firefox safari etc... ...

Giving upload folder these permissions safe or not?

I have a classifieds website with a picture script for uploading pics onto the ads. The pics are uploaded to the "images" dir. The php code which does this requires write access to the directory I am guessing... So, what permissions would you set to the php upload file, and the images directory? I am thinking like this: drwxr-xr-x ...

PHP 4 - Get date of Monday in current week

Hi, I need to find the date of Monday in the current week, whats the best way of doing this in php 4? Thanks, Ben ...

How to code an efficient blacklist filter function in php?

So, I have three arrays like this: [items] => Array ( [0] => Array ( [id] => someid [title] => sometitle [author] => someauthor ... ) ... ) and also a string with comma separated ...

Sending Variables in Post without the input tag

I want to send only one variable via the post method. I have queried the database and have to post $row[id] variable to the page along with the form. To send the user's input we simply write like <input type="text" name="xyz"></input> and then we access it as $_POST[xyz]. This way we can send a variable that a user write. But, I want to ...

Why is my SQL Server query failing?

connect(); $arr = mssql_fetch_assoc(mssql_query("SELECT Applications.ProductName, Applications.ProductVersion, Applications.ProductSize, Applications.Description, Applications.ProductKey, Applications.ProductKeyID, Applications.AutomatedInstaller, Applications.AutomatedInstallerName, Applications.ISO, A...

What's the most auditable way to organize database maintenance scripting/scheduling?

I'm using PHP, Oracle and crontab. Crontab is invoking a php script, which is going to synchronize some data between a local and remote database. First I thought about putting this all in one large, anonymous inline PL/SQL block and executing it in PHP. The problem is that without creating a table to audit the procedure it's really op...

PHP SoapClient error - Missing name for <fault> ...

I'm trying to get PHP connecting correctly to a WSDL using SoapClient, it connects (as in finds the WSDL) okay but then gives me the following error: Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Missing name for <fault> of 'invokeService' The PHP code is as follows: $client = new SoapClient("wsdl.wsdl")...

Client agnostic solutions for RESTful resource security/authentication etc.?

Hi! I'm about to replace my oldfashioned sessionbased server solutions with RESTful ones. Where can I find information about design principles concerning security, authentication etc. when moving into this stateless domain? I need to find solutions that work with different client platforms (Flex/Air, Browser, desktop and mobile apps et...

PHP form post, automatically mapping to an object (model binding)

I do a lot of ASP.NET MVC 2 development, but I'm tackling a small project at work and it needs to be done in PHP. Is there anything built-in to PHP to do model binding, mapping form post fields to a class? Some of my PHP code currently looks like this: class EntryForm { public $FirstName = ""; public $LastName = ""; } $...

How to install custom modules in Kohana 3 framework

I'm learning framework KohanaPhp 3 and I have a problem with adding a module called kolanos-Kohana-captcha. What I've done so far is: I copied the directory kolanos-kohana-captcha into modules directory Copied kolanos-kohana-captcha/config/captcha.php to file application/config/captcha.php Edited the file and added Bootstrap.php ...

Still don't understand file upload-folder permissions

I have checked out articles and tutorials. I don't know what to do about the security of my picture upload-folder. It is pictures for classifieds which should be uploaded to the folder. This is what I want: Anybody may upload images to the folder. The images will be moved to another folder, by another php-code later on (automatic)....