Hi, I'm trying to build a login form using OpenID Auth. I'm using sample code from: http://openidenabled.com/php-openid/ But I only get user's email address when auth with account on myopenid.com I want get returned email when auth link "google.com/accounts/o8/id" How can I do? Thank you very much.
...
The below code is working great for handling errors for text fields in my contact form, but how do I get this same method to work for dropdown select option boxes and textareas?
<input type="text" name="name" value="<?php if($errors){echo $name;} ?>" id="name" size="30" />
For example:
<textarea name="message" value="<?php if($error...
We are developing an inventory tracking system. Basically we've got an order table in which orders are placed. When an order is payed, the status changes from 0 to 1. This table has multiple children in another table order_items.
This is the main structure.
CREATE TABLE order(
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
user_id...
Ok I am making a registry for my website.
First page asks for some personal info
if($error==false) {
$query = pg_query("INSERT INTO chatterlogins(firstName, lastName, gender, password, ageMonth, ageDay, ageYear, email, createDate) VALUES('$firstNameSignup', '$lastNameSignup', '$genderSignup', md5('$passwordSignup'), $m...
I just found out because someone had a ' in their last name and it caused the script to not update anything after that. What's the best way to make their last name safe of any potental damaging characters?
...
I did some search about this topic but found nothing valuable.
If I don't use PHP default session handler, there is no session lock at request level. So, I have to protect critical section by myself.
In Java, we have synchronized. In C#, we have lock.
In PHP, how to do that?
...
Hi,
As far as I know when writing a conditional statement in C such as the following:
if ( some_function() == 100 && my_var
== 5 ) { //do something }
is slower to execute than
if ( my_var == 5 && some_function() ==
100 ) { //do something }
because it's faster to execute the my_var == 5 rather than all of the code in th...
The following code gets a 'report line' as an array and uses fputcsv to tranform it into CSV. Everything is working great except for the fact that regardless of the charset I use, it is putting a UTF-8 bom at the beginning of the file. This is exceptionally annoying because A) I am specifying iso and B) We have lots of users using tools ...
In my project I have a database class that I use to handle all the MySQL stuff. It connects to a database, runs queries, catches errors and closes the connection.
Now I need to create a members area on my site, and I was going to build a users class that would handle registration, logging in, password/username changes/resets and logging...
Hi, say I have this class:
class animal {
function noise() {
print 'woof';
}
function move() {
print 'moved';
}
}
class dog extends animal {
}
What I would like to do is when i run $dog->noise() or $dog->move(), it would run something first prior to calling animal class's noise/move. Is this doable? Like ma...
Hi guys. I'm working through examples from a book on php/mysql development.
I'm working on a linux/apache environment.
I've set up a database and a user. I attempt to connect with this line of code:
$db_server = mysql_connect($db_hostname, $db_username, $db_password);
I get this error:
Warning: mysql_connect()
[function.mysql-c...
this url: http://bbs.pramool.com/webboard/checksum/index7.php?imgnum=CHMSuB5Q9j
= 4P2A2W ?
...
The Zend Tutorial lists many assertions to check the output generated by a request.
http://framework.zend.com/manual/en/zend.test.phpunit.html
But they all seem to assume that the output is html. I need to test json output instead.
Are there any assertions helpful to check json, or is there at least a generic way to make assertions ag...
I have an actionscript function that loads an external swf and is currently linked to a button in the same swf...
function btnClick(event:MouseEvent):void{
SoundMixer.stopAll();
removeChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded);
loader.load(movieSWF)
loader.x=Xpos
loader.y=Ypos
addChild(l...
I am working on a project that has a requirement such that login details can only be accessed from one machine at one time.
For example, if I grant you access to my website and you login from your home machine, the system will store this settings in a cookie/database. Now if you try the same login details on your work machine or any oth...
i'm just wondering how can you return the names of the models you've created inside your models folder?
...
I have a < ul > with some < li >(s). I want to count the number of these < li>s on server side. And if this number qualifies a given condition then i would like to add some more < li> elements to this < ul>. Can someone please help me with this ?
...
Hi guys,
I am trying to use SOAP in javascript but i am not getting how to start it.
Here is the code sample i write in PHP and it works fine. I want to write this code in Javascript. In following code i call one api from a www.example.com and for calling certain api we require to pass some parameters.
$soapClient = new SoapClien...
Hello,
If you visit this site:
http://www.catswhocode.com/blog/
You would see that there is an image and summary for each post. What is the proper way to implement that?
Is this done using wordpress custom fields?
Or whether this is coded in image.php file present in theme folder?
How do i do that?
Thanks.
...
Hello again. Im adding an image to my wordpress theme through dreamweaver cs4 and themedreamer. The image will go in the sidebar.php. When I inserted an image it doesnt shows in firefox and explorer. With safari, the image only shows an empty box with a question sign in the middle.
Is there a special way to add image in a wordpress temp...