Hey guys,
I'm trying to take values from a dropdown two boxes and send them to a PHP file which will draw an appropriate field from a mySQL database depending on the combination chosen and display it in a div without refreshing the page using AJAX. I have the second part sorted, but I'm stuck on the first part.
Here is the HTML: http:/...
My website used to work on wordpress engine but now I'm writing my own script. The problem is that users passwords in wp_users table are encoded in a strange way... Can anyone please tell how should I encode it so that it worked on my new script?
...
Hello. I'm trying to create a script that copies data from an old legacy mysql database into my new utf-8 formatted database.
One particular field is causing me trouble, its a latin1 field - and one record has the following in it:
!-#$%'&*£¥
When the update is performed, I get the following error message:
Zend_Db_Statement_Except...
Hi,
After viewing some answers on stackoverflow,
preg_match_all('/<img[^>]+>/i',$html, $result);
$img = array();
foreach( $result[0] as $img_tag)
{
preg_match_all('/(title)=("[^"]*")/i',$img_tag, $img[$img_tag]);
}
//print_r($img);
foreach ($img as $imgg)
echo $imgg[2][0];
The above code finds img title, but however it return a...
I'm writing a web app that at one point allows a user to upload a photo to a flickr account (mine). I want to do this without saving the intermediate image on the server my web app is on.
What I've got so far is a page which implements phpFlickr and accepts a POST from a simple html form. I use $_FILES['file']['tmp_name'] as the path f...
How can I parse the flash vars from a string like this?
<script type="text/javascript">
flashvars.added = "2010-07-18";
flashvars.name = "testing+purposes";
flashvars.user = "jhon+doe";
</script>
I am using curl to get the string.
...
Hello there , I have some images uploaded in a folder on my server, and their paths are stored
in a table in my database. Whats the best way to display this images on the browser(as a gallery)?Should I use jqery or maybe codeigniter could do the job?Please provide some examples or resources..Thanks!
...
Hi,
I'm thinking of building a complete website on top of wordpress. The site will be similar to a shopping or a job search site, with moderate complexity.
Is it possible to do so, with my own custom database?
...
Hi ,
i am generating a dropdown in a twin forloop ( for loop inside a forloop)
when i post the same with IE7/8 i get the values as an array(array { [0] = 11_31_2}), but in firefox i get it as 11_31_2.
below is the following code i use
for ($k=1;$k<=strlen($weeklist);$k++) {
if ($presentweek == 1) {
$k = 0;
}
if (s...
I have the following code in PHP:
if (preg_match('@^[a-z0-9/._-]+$@i', $script)
&& !preg_match('@([.][.])|([.]/)|(//)@', $script))
I'm making the assumption that the predicate for the if statement returns true for the string js/core.js.
How would I translate this to C#? The dumb translation is as follows:
if(Regex.IsMatch(...
I'm developing a long running command line script and of course I want in not to launch itself more than once. So I write a .pid file and on launch check if a process with such PID exists.
The problem is on Windows it returns 0 as a PID, so I always get a process by that PID running (System Idle has PID 0).
Does someone know how to fix ...
Hello again, I have the following code with me, it produce the img title of specified text,
let say the title = waterfallfountainpicture20x20, how do i replace the word fountain with lagoon so it would become waterfalllagoonpicture20x20?
preg_match_all('/<img[^>]+>/i',$html, $result);
$img = array();
foreach( $result[0] as $img_tag)
{
...
I'm working on a web application using Zend that we'd like to ship with some default forms and views. We'd like the client to be able to create custom forms and/or views that could be placed in another directory that could override the default forms. IE, Zend would check to see if any custom forms (or views) existed, and if so, load thos...
There is a variable $list, which has some array.
printr_r($list);
gives something like:
Array (
[0] => stdClass Object (
[ID] => 1
[name] => Martha Dandridge
)
[1] => stdClass Object (
[ID] => 35
[name] => Abigail Smith
)
[2] => stdClass Object (
[ID] => 153
[name] =...
I'm getting this fatal error message:
Fatal error: Can't use method return value in write context in C:\wamp\www\mySite\application\controllers\eventsManager.php on line 115
Could someone tell me what it means?
The line it refers to is this:
$this->session->set_flashdata('alert') = '<ul>'.validation_errors('<li>','</li>').'</ul>';
...
In PHP, can someone explain to me why this resolves to true:
'NONE' == 0
...
Fatal error: Uncaught exception
'EppCommandsExceptions' with message
'Required parameter missing'
The line in question:
throw new EppCommandsExceptions($result->msg, $codigo);
Why am I having this error on this line?
On EppCommandsExceptions.class.php
I have this class that extends Exception:
class EppCommandsExceptions ex...
I have two versions of a Drupal site running on my local dev environment. Site X boots perfectly; site Y doesn't - rather than running index.php, install.php is called.
So far, I've:
Stepped through site Y with a PHP debugger; index.php does not seem to be called at all.
Pointed site Y at the database for site X to see whether there w...
I am having trouble searching for what I am looking for. I figure it is best I ask here, so I can also find out what is the best practice or method for what I am attempting.
I want to make a lockout script that prevents people from trying to login in too many times to prevent password cracking. I have one that makes a fade-in pop-up, wh...
in php i used to authenticate whether a user was logged in or not by checking the session for a member id, if set ok, else the page would be redirected via Header to the login page. this auth script was in auth.php and i used to include it in any page that required login. simple. however i cannot do the same in jsp. because the rest of t...