I have a simple problem but no matter what I try I can't see to get it to work. I have a form on a php page and I need to validate the qty value on my form so that it doesn't exceed $qty (value pulled from mySQL) and is not less than zero. Sounds easy--hmm wish it were..lol! I had it checking if the value was numeric and in my attempts t...
Hi guys,
I have a very basic query string which passes a ID to a receiving page.
On that page, I need to dynamically call the YouTube API, giving my playlistID.
I'm having to use PHP for this, and it's a little out of my comfort zone, so hopefully someone can wade in with a quick fix for me.
Here is my variable
$playlist;
And I ne...
Can PHP array passed POST method to catch in ASP.NET MVC?
Query string: WebAccess/ArrayTest?val[]=1&val[]=2&val[]=3
I write: ActionResult ArrayTest (String[] val)
But this only works if the query string to remove the "[]"
...
I have xml table:
<?xml version="1.0" encoding="UTF-8"?>
<table>
<user>
<id>1</id>
<info>
<more>
<nick>John</nick>
<adress>blabla</adress>
</more>
<more>
<nick>Mike</nick>
<adress>blablabla</adress>
<tel>blablabla</tel>
</more>
</info>
</user>
<user>
<id>2</id>
<info>
...
Hello all,
When a user registers with my site I want to offer them a login page and a user area with the URL:
http://user1.mysite.com
http://user2.mysite.com
http://user3.mysite.com ...
I did a google search for this but I wasn't sure of the right terms...
How can I do this without having to actually create lots of subdomains...
Using PHP/PDO/MySQL is it possible to use a wildcard for the columns when a select is done on multiple tables and the returned array keys are fully qualified to avoid column name clash?
example:
SELECT * from table1, table2;
gives:
Array keys are 'table1.id', 'table2.id', 'table1.name' etc.
I tried "SELECT table1.*,table2.* ..." but...
So I have this project in PHP where I have some include files next to the wwwroot (or doc-root) folder instead of under the wwwroot folder. I need however to run/debug this project. in the project properties I can select a index file (index.php) but it's under the doc-root folder, so the Project URL makes http://myprojectmachine/doc-root...
In Cakephp Why would $this->data show up an empty array after submit? i am using the security component.
...
Hi,
I am having a problem getting a custom soap header to work with PHP5. Can anybody guide me please.
What I require is something like this
<SOAP-ENV:Header>
<USER>myusername</USER>
<PASSWORD>mypassword</PASSWORD>
</SOAP-ENV:Header>
What I get is :
<SOAP-ENV:Header>
<ns2:null>
<USER>myusername</USER>
<PASSWORD>myp...
Hello,
I want to make a little script but I'm rather n00b in php so please help me if you can :)
What I want the script to do is:
I have "index.php".
I want "index.php" to read the sub-directories from a known folder, let's say "templates/"
Each sub-directory will contain a file called "content.html".
The index will then load the "co...
I get only one printed result in the foreach echo loop at the bottom of the page.
<?php
defined('_JEXEC') or die('Restricted access');
$db =& JFactory::getDBO();
$query0 = "SELECT * FROM `jos_ginfo` WHERE . . . LIMIT 30";
//echo $query0;
$db->setQuery($query0);
$ginfo = $db->loadObjectList();
//echo
/...
I have more than one Zend_Navigation object in my application. I want to do a test to find out which object holds the page I'm currently on. I didn't see methods for doing that in the documentation. Can this be accomplished? How?
Thanks!
...
How can I Get all subdirectories of a given directory (without files and "." or "..")
and then use each directory in a function?
Thanks.
...
In the code below, the echo at the top returns true, but the echo at the bottom returns nothing. Apparently the code in between is causing me to lose a reference to the $_post variable?
<?php
echo "in category: ".in_category('is-sidebar'); //RETURNS TRUE
if (!get_option('my_hide_recent'))
{
$cat=get_cat_ID('top-menu');
$catHidd...
How can I decrypt a password string in PHP which was encrypted with crypt?
$salt = substr($_POST['password'], 0, 2);
$password = crypt($_POST['password'], $salt);
I need to send the original password in a forget password e-mail.
...
i want to write a function that prints multi-dimensional objects which are text (or integers, etc.) into <span></span> tags and arrays into unordered lists.
how do you make the function work recursively so that it prints everything regardless of what level it's at in the object?
thanks!
...
I've got a nice little web app working that brings down playlists and videos from YouTube using the API. However, YouTube seems to fire back the playlists in the wrong order.
Any idea how I can do that?
Here is my very simple PHP code that does everything I need it to do (apart from date ordering)
<?php
// set feed URL
$feedURL = ...
I'm using Flash Builder 4 Beta 2. I have it connecting to a PHP service. The way I set this up was using the wizard, so I didn't actually write the code to connect to it. The service looks like this:
package services.flash
{
import mx.rpc.AsyncToken;
import com.adobe.fiber.core.model_internal;
import mx.rpc.AbstractOperation;
import val...
Hello there,
I am trying to upload 2 files, the first one is a flash (.swf) file and the second a .png.
At the moment, I would have no problem making 2 different php upload file, with 2 different forms, but Im sure there can be a way to make that all together.
I am not really experimented with PHP, but Im trying to learn.
At the mome...
We have been using PHP/MySQL for our web application which has been growing a lot, the database is around 4-5GB and one of the table is 2GB sometimes, hence slowing down whenever any queries to that table is called.
Should we just try to optimize, or are we using MySQL above its limit? Will switching our web app to .NET/SQL Server reso...