I am trying to populate a private data member inside a class via a $_GET parameter?
Is this possible, or too complex for the constructor to handle?
SOLVED *** - __construct was incorrectly typed
/myfile.php?pid=f3f3rs2
class getvalue{
private $pid;
function __constructor(){
$this->pid=$_GET['pid'];
}
public function get(){
...
Hey all,
my site is now going to start allowing two different types of users to sign up...
normal people
companies
the two will be able to do all the same things on the site, but their profiles will look different, and im sure they will want to store different types of information about themselves.
my question is: should i sto...
Hi my question is about PHP variable variables.
Basically I want to store courseworks marks of n courseworks into n variables, such as cw1 and cw2 etc. Using variable variables how can I come with cw1, cw2 etc.
...
An IT Manager is not allowing the use of SQL Server with an ASP.NET website being developed. The current setup being replaced is a php site connecting to a Microsoft Access database. I have a few reasons of my own as to why SQL should be used, but would like as many strong arguments as possible (student vs. IT Man.). Does anyone have a...
I have a form served in non-UTF-8 (it’s actually in Windows-1251). People, of course, post there any characters they like to. The browser helpfully converts the unpresentable-in-Windows-1251 characters to html entities so I can still recognise them. For example, if user types an →, I receive an →. That’s partially great, like, if I...
New to javascript, my problem is effectively: I have a php page that produces a single form with multiple process blocks or sections each with a group of checkboxes
eg
<form action='./this.php' method='POST'>
One<br>
<input type='checkbox' name='one[part1]'>a<br>
<input type='checkbox' name='one[part2]'>b<br>
<input type='checkbox' nam...
What are the best ways to protect from MySQL injection? What are weaknesses I should look out for?
I know what it is, but I really have no idea how vulnerable I might be. Though I have taken (what I think to be) steps toward protecting myself and my database.
Is there any sure-fire way of stopping someone?
BTW...I write in PHP:)
...
I'm new to Flex and done a few application with only client side programming. Now I'm trying to do the back-end stuff using PHP. Can some one explain where(which folder) to put the PHP file for the Flex file to communicate with PHP. I'm using Flexbuilder 3 IDE.
Thanks
...
I am trying to send a php script some content to be stored in a database via ajax. I am using the jQuery framework. I would like to use a link on a page to send the information. I am having trouble writing the function that will send and receive the information, everything that I have tried is asymptotic.
EDIT
The idea is that the user ...
I found a tool on Zend site. But it is only show who have achieved ZCE by country.
I plan to take ZCE for PHP 5 and I just want to know how many Zend certified engineer available around the world.
Thanks...
...
Hi,
I am using PHP and mysql.
Scenario:
The registration form only required 2 fields. Email and password, and then, first user registered from England, second user from China, etc..
Is there any way to set timezone automatically for different countries of users in PHP? I checked php.net, but no lucks..
...
Does anyone have an example of something that can not be done on a Windows2000 server using PHP5?
UPDATE: Just to clarify, my problem isn't with IIS, or that I'm an "only open source" kinda guy. It's that the hosting is a terrible package across the board. The storage and bandwidth are ridiculous, there's no control panel so in order t...
For objects which compose another object as part of their implementation, what's the best way to write the unit test so only the principle object gets tested? Trivial example:
class myObj {
public function doSomethingWhichIsLogged()
{
// ...
$logger = new logger('/tmp/log.txt');
$logger->info('some mess...
For some reason I can't catch the error. I'm following an example in O'Reillys PHP cookbook, so I'm not doing any cowboy coding (yet).
The error is:
SoapFault exception: [SOAP-ENV:Server] SoapFault::SoapFault() [soapfault.soapfault]: Invalid parameters. Invalid fault code. in C:\xampp\htdocs\soap\client_database.php:13 Stack trace: #0 ...
hello,
I am currently working on a site that requires use of ACL and seen as I am using Zend it makes sense for my make use of there ACL class but I have little to zero idea of how to do this, I have read the docs but this has confused me further...basically all I want do is set up two user groups e.g. normal and admin, normal users ca...
Currently i can create PDF files from images in Imagick with this function
$im->setImageFormat("pdf");
$im->writeImage("file.pdf");
And it's possible to fetch multiple pages with imagick like this
$im = new imagick("file.pdf[0]");
$im2 = new imagick("file.pdf[1]");
But is it possible to save two image objects to two pages?
(example...
Hello,
I have rar extensions installed on php using xampp go-pear
It shown in php info that rar is enabled.
My code is following
<?php
$rar_file = rar_open('htdocs.rar') or die("Can't open Rar archive");
$entries = rar_list($rar_file);
foreach ($entries as $entry) {
echo 'Filename: ' . $entry->getName() . "\n";
echo 'Packed...
How come unserialize isn't restoring my array? See code below..
// prints a:1:{s:8:"txn_type";s:32:"recurring_payment_profile_cancel";}
echo $item['response'];
// prints nothing
print_r(unserialize($item['response']));
I understand why the print_r($response) gives me nothing
** edit - I noticed this
Notice: unserialize() [functio...
Hey, I am so close to fininshing my guess a number game, very simple in PHP, but for some reason I am stuck. I am storing the variable in a hidden form, but obviously each time the page is sent it resets the number so you can never get the right one.
Any ideas? My code is below.
<?php
// generate a random number for user to guess
$numb...
I am using mysql_num_rows to check if one row is returned for my user login and if count == 1 then log user in, I get an error though below my code is after that. Any suggestions?
Warning: mysql_num_rows(): supplied
argument is not a valid MySQL result
resource in
/home/web42001spring09/rcoughlin/public_html/process-login.php
...