hi everyone! I'm attempting to reload an iframe when a onChange event occurs
heres what i got in javascript tags in the header
`
function getSchedule(oEvent)
{
var n = document.getElementById("wantedTherapist");
var newn = n.options[n.selectedIndex].value;
window.frames['schedule'].src = "schedule.php?therapist="+newn;
}...
I have an website where people can place a vote like this:
http://mysite.com/vote/25
This will place a vote on item 25. I want to only make this available for registered users, and only if they want to do this. Now I know when someone is busy on the website, and someone gives them a link like this:
http://mysite.com/vote/30
then th...
I don't know how php.ini was configured since I don't have access to it. But on top of my php code file I have
error_reporting(E_ALL);
ini_set('display_errors', '1');
But still, if there is an error, e.g. missing a ")", the page is blank. It is so painful to debug without error message. Why were the errors not shown?
...
ANSWERED: THE FUNCTION WORKS AS I WANTED IT TO. I HAD A TYPO IN MY TEST PHP THAT MADE IT RETURN TRUE REGARDLESS.
I am using in_array, and I'm trying to use it in a way where it will only return true if it's an exact match of one of the objects in the array, not just if it's "in" the array.
e.g.
1. $sample_array = array('123', '234', '...
I'm working on a music blog that provides review scores ranging from 0.0 - 10. Since the authors already developed their system of typing in the score in the content, I'm trying figure out a way to emphasis them better.
Example:
"Score: 6.4"
returns something like
<div class="score">6.4</div>
Is there way to do this in an array t...
Hello all,
Two random question as I try to integerate Paypal IPN into my Codeigniter based web app.
1) Are these two lines the same?
$data['pp_info'] = $this->input->post();
$data['pp_info'] = $_POST;
2) A user agrees to pay a monthly recurring fee to use your service using paypal - first payment you are aware they have paid as you...
I'm new to Unit Testing, and I'm only getting into the routine of building test suites. I have what is going to be a rather large project that I want to build tests for from the start.
I'm trying to figure out general strategies and patterns for building test suites. When you look at a class, many tests come to you obviously due to the ...
I'm new to Symfony. Is my understanding correct that the User class is actually for controlling sessions? But is there built-in login and account creation? I'm not finding it. But if there's an admin backend generator, how can it function without user logins?
...
if I add an item to the $_COOKIE array as such:
setcookie("favorites[]", "value", time()+3600);
I can delete any item from the $_COOKIE[favorites] array like this:
setcookie("favorites[$deletekey]", "", time()+3600);
EXCEPT the first one added so this does not work:
setcookie("favorites[0]", "", time()+3600*24);
Ho...
I have a small script that I am try to port to work for serving video data to the iPhone/Blackberry/PalmPre etc.
The code is ridiculously simple:
$type = "video/3gpp"; /* get mimetype from db */
$fileid = "0001"; /* File path from db */
header( "Content-Length: " . filesize( $fileId ) );
header( "Content-type: $type" );
readfile( $fi...
I want to use pdo in my application, but before that I want to understand how internally
PDOStatement->fetch and PDOStatement->fetchAll.
For my application, I want to do something like "SELECT * FROM myTable" and insert into csv file and it has around 90000 rows of data.
My question is, if I use PDOStatement->fetch as I am using it ...
I'm trying to test a single file if it is open using lsof. Is there a faster way than this?
$result = exec('lsof | grep filename | wc -l');
if($result > 0) {
//file is open
}
I'm thinking their must be a way to just test for one file if you know the filename. All I really need is a true or false.
...
Hi,
I have a php class that generates a map image depending on my db data. It is periodically updated thru a serInterval loop.
I am trying to update it with no flickering but I just can't. I've tried different methods (preloader, imageswitcher) with no success.
//first load
function map() {
$("#map").html("<img src=map.php?randval=...
I will try to be as clear as possible because I can't get anybody to help me around,
I am trying to associate some data from a 'videos' table with their respective ID.
Lets say, I have column ID, title, serie, season, episode.
I am getting my data :
<?
$result = mysql_query("SELECT * FROM videos WHERE serie = '".$row['serie']."' ...
I know how to create .po files and how to generate .mo files and then use them for translation on my Codeigniter powered site. However, I'm not quite sure on how to change language from the site GUI. I want to stick to codeigniter's default url calling schema: www.domain.com/controllername/method/param1/param2.
Calling the server like ...
I have two tables.
table_x:
id INT(11)
tag INT(11)
table_tags:
id INT(11)
name VARCHAR(255)
Then I use PHP to perform the following query:
SELECT * FROM table_x LEFT JOIN table_tags ON table_x.tag = table_tags.id
The only problem is: how do I access table_x.id and table_tags.id in the results?
Here is the PHP code:
$...
I have a bunch of files that were named in a somewhat standard format. The standard form is basically this:
[integer]_word1_word2_word3_ ... _wordn where a word could really be anything, but all words are separated by an underscore.
There is really only 3 things I want to do to the text:
1.) I want to modify the integer, which is al...
Hello,
I am using $data in all my views $this->load->view('my_view', $data);
I have also autoload a Controller following this guide Extending Core Controller
But I want to make $data global because in views there is a sidebar which is constant for whole project and displays info fetched through db in autoloaded controller
Currently ...
I have been loading content with ajax and all works fine. Here is my code
$(document).ready(function() {
//Load a-z.php
//Timestamp resolves IE caching issue
var tsTimeStamp= new Date().getTime();
$.post('../../includes/categories/a-z.php',
{action: "post", time: tsTimeStamp},
function(data){
$('#moviescontainer')....
I'm trying to write (or just find an existing) PHP method that can take a link and extract the url. The trick is, it needs to hold under the weight of strange looking domains like:
www.champa.kku.ac.th
Looking at this one myself with human eyes, I still guessed it incorrectly: thought the domain would be kku.ac.th but that gives a dn...