Ok so, Im using jQuery to do username and email checks before a signup...
this sets a variable true or false depending on the response from php.
$(document).ready(function() {
if (usr_checked == true) {
if (em_checked == true) {
$("#registerbttn").removeAttr("disabled");
...
Hello! I have some example of pushing array to array in session object:
class someClass extends someOtherOne {
...////// some other code here that starts session and creates namespace
public function __add2Session($a,$b) {
$namespc = $this -> __getnewNameSpace(); //returns a Zend Session Namesapce (object)
if ...
I am trying to write a plugin which will update a user field. I can use the update user meta function OK, but when I try the wp_update_user it doesnt work.
wp_update_user($user_ID, 'user_nicename', 'test');
That crashes the plugin.
Do I need to include something for this function to work??
...
Hey!
I'm using CakePHP to build a site which has a crawler that mines data from different sites. The problem is that I would like to be able to call the crawler from command line (since it can take hours for it to finnish) and I would like to the use models in CakePHP when saving the data.
Is there a file I could just include that incl...
why is the content of $encrypted every time different?
// aquire public key from server
$server_public_key = openssl_pkey_get_public(file_get_contents("C:\publickey.pem"));
// rsa encrypt
openssl_public_encrypt("123", $encrypted, $server_public_key);
also I have tried this one
$publicKey = "file://C:/publickey.pem";
$privateKey =...
I have a django blog project and a chat in PHP.
I need to share the id of the user logged in django ( request.user.id ) with the chat in PHP.
Is this possible ?
...
I have a PHP array of strings: ie: "Big green car parked outside"..etc
I would like to perform boolean search operations on these strings, similar to MySQL fulltext searching , or Sphinx Searching.
For example, I would like to find all strings containing word "green" but not "car"
Does anyone know of any existing PHP classes or librar...
Hey,
I'm not sure that silly question, but I ask:
So, if there is an anonymous function I can give it as another anonymous functions parameter, if it has been already stored a variable.
But, whats in that case, if I have stored only one function in a variable, and add the second directly as a parameter into it? Can I add parameters to t...
I want to add check boxes inside a combo box and then use the values of the checked boxes in my sql query.
Also I need to append the checked values to an array and then use the elements of that array in my sql query.
How can I proceed?
...
Any way I can cut out a part of an existing image, and then save the result as a new image(file)?
...
I am trying to replace the html code inside the div 'resultsContainer' with the html of $response.
The result of my unsuccessful code is that the contents of 'resultsContainer' remain and the html of $response shows up on screen as text rather than being parsed as html.
Finally, I would like to inject the content of $response inside 'r...
Hi ,
in Google i find one open source search engine ,
This Open Source
This is my first search engine project ,
This si one open source ,
In this site,
There is a link called ADD link ,
There visitor will add his/her site ,
Then admin will look and later , admin index the user added links ,
this is basic functionality of thi...
hi all
i am working on a project, it need email validation when user enter his email address check for availiblity. i wrote the php code in javascript it works fine but my problem is when some one see my page source it is displaying all user email address in javascript code. i want hide this one.
i wrote javascript code in seperate f...
I'm trying to retrieve a list of my friends' birthdays using the following code. I'm using Facebook's FQL method using the old REST API.
<?php
$appapikey = '<app api key>';
$appsecret = '<app secret>';
$token = 'access_token=<token>';
$fql = "SELECT uid, first_name, last_name, birthday, sex, proxied_email FROM standard_user_in...
I have some set of SQL queries which is in a file(i.e query.sql), and i want to run those queries in files using PHP, the code that i have wrote is not working,
//database config's...
$file_name="query.sql";
$query=file($file_name);
$array_length=count($query);
for($i=0;$i<$array_length;$i++)
{
$data .= $query[$i];
}
echo $data; ...
I am pretty new in SQL so this may be a stupid question...
I have a form in PHP which fills in few fields in my SQL table. I have this code:
$sql="INSERT INTO $tbl_name
(app_name, app_path, short_desc, full_desc)
VALUES ('$_POST[app_name]', '$_POST[app_path]',
'$_POST[short_desc]', '$_POST[full_desc]')";
But even app_name and app_pat...
I need to dinamicaly generate a PDF from HTML, but I have PDF Support disabled on my hosting, so is it possible to do without PDFlib GmbH library?
Thanks
...
Hi,
I have to execute a Linux more command in PHP from a particular offset, format the result and display the result in the browser.
My code for the above is:
<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT=10>
<META HTTP-EQUIV=PRAGMA CONTENT=NO-CACHE>
<title>Runtime Access log</title>
</head>
<body>
<?php
$moreCom...
hi, I am so worry :(
I dropped one of the tables from the database accidentally.
fortunately, I have back-up. (I have used the "Auto backup for mysql")
The back-up of the table is stored as .txt file (56 Megabytes) on my PC.
I tried to import it by PhpMyAdmin and the import failed because the file is too large to import.
then I up...
This is for an upcoming project. I have two tables - first one keeps tracks of photos, and the second one keeps track of the photo's rank
Photos:
+-------+-----------+------------------+
| id | photo | current_rank |
+-------+-----------+------------------+
| 1 | apple | 5 |
| 2 | orange | 9 ...