I have a while loop which creates a list of anchor tags each with a unique class name counting from 1 to however many items there are. I would like to change a css attriubute on a specific anchor tag and class when it is clicked so lets say the background color is changed. Here is my code
while($row = mysql_fetch_array($results)){
$tit...
Hi guys,
I'm confused about exactly what I should have in my controller and what in my method.
Specifically, I have this in the action method:
public function upcomingshowsAction()
{
$gcal = $this->_validateCalendarConnection();
$uncleanedFeedArray = $this->_getCalendarFeed($gcal);
$finishedFeedArray = $thi...
How do I get the value of what the user inputs into the text field for quantity?
echo"<label>Qty:</label><input type=\"text\" name\"qty\" size=\"3\" maxlength=\"3\" value=\"1\"/>";
...
I want to create slug URL's from a users title in my system.
If a user types "The best way's to get slim; period!", then I want the slug to be "the-best-ways-to-get-slim-period".
Also, if someone has already created a page with that title I want the slug to be "the-best-ways-to-get-slim-period-1".
My question is how can I check the da...
At the minute i have:
$Text = preg_replace("/\[code\](.*?)\[\/code\]/s", "<mytag>\\1</mytag>", $Text);
how can i escape the backreference using htmlentities()?
...
This is my pagination script:
<?php
/***********************************
* PhpMyCoder Paginator *
* Created By PhpMyCoder *
* 2010 PhpMyCoder *
* ------------------------------- *
* You may use this code as long *
* as this notice stays intact and *
* the proper credit is given to *
*...
Hi I have this problem:
I have to send a byte array (encoded photo) from my PHP client to the WCF host. when I do a var_dump() on my array in PHP I get an array[2839] which is ok but on the server side when i debug I see that received array is only byte[5]...any idea how I can fix it?
I used code like this
$file = file_get_contents($_...
I want to be able to ban users by IP. My idea is to keep a list of IP's as rows in an BannedIPs table (the IP column would be an index).
To check users' IP's against the table, I will keep a session variable called $_SESSION['IP'] for each session. If on any request, $_SESSION['IP'] doesn't match $_SERVER['REMOTE_ADDR'], I will update $...
I'm currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom fields that will later be read from the template. The plugin adds an additional meta box to the "Edit Post" screen which is responsible for manipulating these values.
My problem is that the custom fields generated by the plugin also show up in t...
Hello all.
I currently have a messaging system.
I am looking to make it so that when a user receieves a new message, they get an alert. A popup perhaps? Like a message box saying "you have a new message".
How could I achieve this?
Thanks
...
How can I make something like this with Zend_PDF:
I have a few columns A, B, C, D, E and after them I will have some information, something like excel.
A | B | C | D
ss|das|dad|ds
ss|das|dad|ds
ss|das|dad|ds
How can I create something like this with ZF_pdf? I will pull the data from DB, can you please give me an example?
...
I really liked flexibility of emacs but it is really annoying to make it work. I want to use it for web development html, css, javascript, php. I first tried emacs-starter-kit . It didn't included nXhtml. Also C-g key binding does not work (they call it starter kit but basic key command does not work). I think it is mapped for git contro...
I'm trying to set up a login script for PHP using the tutorial on this site. The problem is that the site stops when it hits these lines, no error, no text:
<?php
$conn = mysql_connect('localhost', 'root', 'password') or die('error line7' . mysql_error());
mysql_select_db('mydb', $conn) or die('error line8' . mysql_error());
?>
If I t...
I have always been confused that .e,g in php i have sql statement
$qry = "select * from table where id = $id";
now can i insert "$" directly inside the quotes or i have to use
$qry = "select * from table where id =".$id." ";
or
$qry = 'select * from table where id = $id';
or
$qry = 'select * from table where id = '$id'';
...
My understanding is that in order to return a complex PHP variable to Javascript, it should be done via AJAX and json_encode. Could somebody give me an actual example (both PHP and Javascript code) of this? Lets say we have the two-dim array in PHP:
$twoDArr = array( array('Greg', 44, 'Owner'),
array('Joe', 23, 'Rent...
Hello,
I have a string like this The theme song of whatever - http://www.anydomain.com/pop_new.php?sid=10623&aid=1581&rand=0.6808111508818073 #string
And now, I need to do the following thing.
Get the url from above string http://www.anydomain.com/pop_new.php?sid=10623&aid=1581&rand=0.6808111508818073
Replace the url ...
I am creating a Google Maps Social Application.. I have a basic marker that has a blank square in between it where I need to put the user uploaded picture.
I already have the user uploaded pictures. Now How do I create these dynamic markers using PHP.. The accepted pictures are jpeg and png.
I have heard of the PHP GD Library and woul...
Hi, I'm an engineering student and I'm developing a simple software based on HTML, PHP and mysql. I learned this topics on w3schools. I know only the basics. I tried to search about this in this website but I found questions about PHP, MySQL and HTML radio buttons which were much more complex than I need and that I could understand. Sorr...
Hi All,
I'm trying to code a split panel, Left and right. Each will have a button which you can click on and it will toggle that panel, while expanding the other.
I am clueless as to where to start off? Is there an example that already does this?
Can someone help me out.
Thanks
...
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
hea...