ELATED: Authoring and Programming http://www.elated.com/ The nitty-gritty of coding websites. Get help with HTML, CSS, JavaScript, PHP, Perl, or any other Web programming problem. en-us Sat, 12 Jan 2013 08:32:00 GMT Sat, 12 Jan 2013 08:32:00 GMT http://blogs.law.harvard.edu/tech/rss ELATED.com feeder stop video on div hide (vimeo iframe) http://www.elated.com/forums/topic/5567/#post23279 From: srf046


i have 3 divs (each containing a video) that are shown/hidden depending on which link is clicked.

what i cant figure out is how to make the current video stop when its div is hidden

here's the code: http://jsfiddle.net/pixeloco/awk63/

thanks for any guidance you can provide!

View » | Reply »

]]>
Thu, 10 Jan 2013 01:50:18 GMT http://www.elated.com/forums/topic/5567#post23279
Re: Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post23278 From: mikewkd2


@matt I was wondering how editArticle.php validates itself so it isn't submitted blank? because I can't seem to find any code for it?

View » | Reply »

]]>
Mon, 07 Jan 2013 15:11:17 GMT http://www.elated.com/forums/topic/5114#post23278
Re: How to Make a Slick Ajax Contact Form with jQuery and PHP http://www.elated.com/forums/topic/5171/#post23276 From: minimal8


Nice post! really helpfull, Daniel from Minimal Web http://minimalweb.com.ar/diseno-web-buenos-aires

[Edited by minimal8 on 03-Jan-13 12:12]

View » | Reply »

]]>
Thu, 03 Jan 2013 18:09:03 GMT http://www.elated.com/forums/topic/5171#post23276
Re: Drag-and-Drop with jQuery: Your Essential Guide http://www.elated.com/forums/topic/5136/#post23275 From: chrishirst


Use conditional comments to show an alternative.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Tue, 01 Jan 2013 22:45:22 GMT http://www.elated.com/forums/topic/5136#post23275
Re: Drag-and-Drop with jQuery: Your Essential Guide http://www.elated.com/forums/topic/5136/#post23274 From: shabnam_d


some of users of my website cannot see draggable box in IE9.
what can i do ?

View » | Reply »

]]>
Tue, 01 Jan 2013 10:51:56 GMT http://www.elated.com/forums/topic/5136#post23274
Re: Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post23272 From: Jim22150


Hi Matt, great and helpful tut! Thanks for your expertise. I am wanting to play with the homepage and am wondering if it's possible to put the articles Table in an XML or JSON file, and then link data to an RSS feed to track new articles added. Is this possible? If you can provide an example and/or explanation of XML/JSON within the context of this tutorioal it would be very helpful to a lot of us.

[Edited by Jim22150 on 03-Jan-13 12:09]

View » | Reply »

]]>
Sat, 29 Dec 2012 21:19:44 GMT http://www.elated.com/forums/topic/5114#post23272
Re: How to Make an Elegant Sliding Image Gallery with jQuery http://www.elated.com/forums/topic/5158/#post23271 From: LittleMama1980


Firstly, I love this Slider! Thank you for taking the time and energy to create and share it.

I am brand new to jquery and javascript so pardon if these questions have commonly known answers.

I am currently auto-playing the slideshow using "var timer = setInterval( moveRight, 4500 );" I am not sure if this is the best way to go about it. Is it? If it is, then how can I get the right and left buttons to override the setInterval timing? Currently, even when I press the buttons, it still wants to pull the next slide in from right to left, every 4500 ms, no matter which direction I'm going in, and regardless of when I just pressed the right/left arrow button. I am okay with the auto-play feature being turned off once the user hits the left/right arrows. I just don't know how to do it.

It would also be nice if the user could pause the playback and resume it again with the space-bar. How can I do that?

Also, I would like the slideshow to infinitely loop back to the first image as if there was no break in the loop. I have found a way to rig it but simply listing the images again, but this will only "loop" until the images are done being shown, not infinitely.

Last but not least, how can I set the time it takes to switch out each slide to be 1000 or 1500 ms?

Thank you so much for your help!

[Edited by LittleMama1980 on 28-Dec-12 22:09]

View » | Reply »

]]>
Sat, 29 Dec 2012 03:17:52 GMT http://www.elated.com/forums/topic/5158#post23271
Re: Inserting Date from web form http://www.elated.com/forums/topic/5566/#post23270 From: papadammy


Thanks Chris, I got this help from someone, hope it helps someone out there too...

This generates the dates 1 -31:


Code:
--------------------
$dates = range(1,31); // create an array of numbers 1-31
$match = 3 ;

echo "<select id=day name=day >" . PHP_EOL ;

foreach ($dates as $date){ // iterate (loop) through the array

$selected = ($date === $match) ? "selected=selected" : "" ;
// same as writing : if this date matches the chosen date, make it selected else echo empty string

echo "<option = $date $selected>$date</option>" . PHP_EOL ;
}

echo "</select>" . PHP_EOL ;
--------------------


As it stands that function returns an array with 2 items in it, either false and an error message or true and a date.

You would test for true and insert the data like this:



Code:
--------------------

$purchaseDate = convertDateToMySQL($_POST['month'], $_POST['day'], $_POST['year']);

// $purchaseDate is now an array

// temp line of debug
var_dump($purchaseDate) ; // inspect it

if($purchaseDate[0] === true){
// go ahead and try and insert it into the db


// etc

$st->bindParam( ":purchaseDate", $purchaseDate[1]);

// etc

}else{

echo "Warning: $purchaseDate[1]" ;

}
--------------------



Chris, I appreciate you and Matt so much for your help.

View » | Reply »

]]>
Tue, 25 Dec 2012 19:44:30 GMT http://www.elated.com/forums/topic/5566#post23270
Re: Inserting Date from web form http://www.elated.com/forums/topic/5566/#post23269 From: papadammy


That's the purpose of my question. I want to know how to insert dates in this format into database. In case I have properties like $dateOfBirth, $purchaseDate, $weddingDate etc in my class, how do I get each of these dates into the database considering the fact that each of them must contain the variables day, month and year. thanks man.

View » | Reply »

]]>
Tue, 25 Dec 2012 18:57:08 GMT http://www.elated.com/forums/topic/5566#post23269
Re: Inserting Date from web form http://www.elated.com/forums/topic/5566/#post23268 From: chrishirst


And what happens instead of the date being posted to the server?

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Tue, 25 Dec 2012 13:14:55 GMT http://www.elated.com/forums/topic/5566#post23268
Inserting Date from web form http://www.elated.com/forums/topic/5566/#post23267 From: papadammy


I have tried checking through the web how to insert date from dropdown menu into mysql but couldn't get it done. I don't want to use unix timestamp as it is limited in range because I want insert date of birth of those born earlier than 1970. Also, some form might have to contain more than one date, for example my search form has two dates to specify the range for the information to be retrieved from the database. I don't want to use unix timestamp please. My present code is below and I write it like that so that when I want to edit info from the database, whatever I have stored will be displayed first. Any advice and example of how to get this done will be highly appreciated. I'm providing the code for my test page below but please note that I can't get the date into the database yet but I was able to do that using unix timestamp.

My form is below:

[CODE]<?php
require_once $_SERVER['DOCUMENT_ROOT'] . 'classes/DatabaseManager.php';
$conn = DatabaseManager::getConnection();

require_once('utility_funcs.inc.php');

$purchaseDate = convertDateToMySQL($_POST['month'], $_POST['day'], $_POST['year']);

if(isset($_POST['convert']) && $_POST['convert'] == 'Convert')
{
$sql = "INSERT INTO mydate (purchaseDate, firstname) VALUES (:purchaseDate, :firstname)";
try
{
$st = $conn->prepare ( $sql );
$st->bindParam( ":purchaseDate", $_POST['purchaseDate'], PDO::PARAM_INT );
$st->bindParam( ":firstname", $_POST['firstname'], PDO::PARAM_STR );
$st->execute();
$this->id = $conn->lastInsertId();
$conn = null;
}
catch(PDOException $e)
{
echo 'Unable to insert purchase date' . $e->getMessage();
exit();
}
}

?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Convert Date to MySQL Format</title>
<style>
input[type="number"] {
width:50px;
}
</style>
</head>

<body>
<form id="form1" method="post" action="">
<p>
<label for="select">Month:</label>
<select name="month" id="month">
<option value="">Select</option>

<option value="1" <?php if(isset($month) && $month == '1') echo 'selected'; ?> >Jan</option>
<option value="2" <?php if(isset($month) && $month == '2') echo 'selected'; ?> >Feb</option>
<option value="3" <?php if(isset($month) && $month == '3') echo 'selected'; ?> >Mar</option>
<option value="4" <?php if(isset($month) && $month == '4') echo 'selected'; ?> >Apr</option>
<option value="5" <?php if(isset($month) && $month == '5') echo 'selected'; ?> >May</option>
<option value="6" <?php if(isset($month) && $month == '6') echo 'selected'; ?> >Jun</option>
<option value="7" <?php if(isset($month) && $month == '7') echo 'selected'; ?> >Jul</option>
<option value="8" <?php if(isset($month) && $month == '8') echo 'selected'; ?> >Aug</option>
<option value="9" <?php if(isset($month) && $month == '9') echo 'selected'; ?> >Sep</option>
<option value="10" <?php if(isset($month) && $month == '10') echo 'selected'; ?> >Oct</option>
<option value="11" <?php if(isset($month) && $month == '11') echo 'selected'; ?> >Nov</option>
<option value="12" <?php if(isset($month) && $month == '12') echo 'selected'; ?> >Dec</option>
</select>
<label for="day">Date:</label>
<select name="day">
<option value="">Select</option>
<option value="1" <?php if(isset($day) && $day == '1') echo 'selected'; ?> >1</option>
<option value="2" <?php if(isset($day) && $day == '2') echo 'selected'; ?> >2</option>
<option value="3" <?php if(isset($day) && $day == '3') echo 'selected'; ?> >3</option>
<option value="4" <?php if(isset($day) && $day == '4') echo 'selected'; ?> >4</option>
<option value="5" <?php if(isset($day) && $day == '5') echo 'selected'; ?> >5</option>
<option value="6" <?php if(isset($day) && $day == '6') echo 'selected'; ?> >6</option>
<option value="7" <?php if(isset($day) && $day == '8') echo 'selected'; ?> >7</option>
<option value="8" <?php if(isset($day) && $day == '8') echo 'selected'; ?> >8</option>
<option value="9" <?php if(isset($day) && $day == '9') echo 'selected'; ?> >9</option>
<option value="10" <?php if(isset($day) && $day == '10') echo 'selected'; ?> >10</option>
<option value="11" <?php if(isset($day) && $day == '11') echo 'selected'; ?> >11</option>
<option value="12" <?php if(isset($day) && $day == '12') echo 'selected'; ?> >12</option>
<option value="13" <?php if(isset($day) && $day == '13') echo 'selected'; ?> >13</option>
<option value="14" <?php if(isset($day) && $day == '14') echo 'selected'; ?> >14</option>
<option value="15" <?php if(isset($day) && $day == '15') echo 'selected'; ?> >15</option>
<option value="16" <?php if(isset($day) && $day == '16') echo 'selected'; ?> >16</option>
<option value="17" <?php if(isset($day) && $day == '17') echo 'selected'; ?> >17</option>
<option value="18" <?php if(isset($day) && $day == '18') echo 'selected'; ?> >18</option>
<option value="19" <?php if(isset($day) && $day == '19') echo 'selected'; ?> >19</option>
<option value="20" <?php if(isset($day) && $day == '20') echo 'selected'; ?> >20</option>
<option value="21" <?php if(isset($day) && $day == '21') echo 'selected'; ?> >21</option>
<option value="22" <?php if(isset($day) && $day == '22') echo 'selected'; ?> >22</option>
<option value="23" <?php if(isset($day) && $day == '23') echo 'selected'; ?> >23</option>
<option value="24" <?php if(isset($day) && $day == '24') echo 'selected'; ?> >24</option>
<option value="25" <?php if(isset($day) && $day == '25') echo 'selected'; ?> >25</option>
<option value="26" <?php if(isset($day) && $day == '26') echo 'selected'; ?> >26</option>
<option value="27" <?php if(isset($day) && $day == '27') echo 'selected'; ?> >27</option>
<option value="28" <?php if(isset($day) && $day == '28') echo 'selected'; ?> >28</option>
<option value="29" <?php if(isset($day) && $day == '29') echo 'selected'; ?> >29</option>
<option value="30" <?php if(isset($day) && $day == '30') echo 'selected'; ?> >30</option>
<option value="31" <?php if(isset($day) && $day == '31') echo 'selected'; ?> >31</option>
</select>
<label for="year">Year:</label>
<input name="year" type="number" required id="year" maxlength="4" placeholder="YYYY" value="<?php if(isset($year)) echo $year; ?>">
</p>

<p><label for="firstname">Firstname:</label>
<input name="firstname" type="text" />

<p>
<input type="submit" name="convert" id="convert" value="Convert">
</p>
</form>

</body>
</html>
[/CODE]

The utility function included above is presented here

[CODE]<?php
function convertDateToMySQL($month, $day, $year) {
$month = trim($month);
$day = trim($day);
$year = trim($year);
$result[0] = false;
if (empty($month) || empty($day) || empty($year)) {
$result[1] = 'Please fill in all fields';
} elseif (!is_numeric($month) || !is_numeric($day) || !is_numeric($year)) {
$result[1] = 'Please use numbers only';
} elseif (($month < 1 || $month > 12) || ($day < 1 || $day > 31) || ($year < 1000 || $year > 9999)) {
$result[1] = 'Please use numbers within the correct range';
} elseif (!checkdate($month,$day,$year)) {
$result[1] = 'You have used an invalid date';
} else {
$result[0] = true;
$result[1] = "$year-$month-$day";
}
return $result;
}[/CODE]

View » | Reply »

]]>
Tue, 25 Dec 2012 02:48:26 GMT http://www.elated.com/forums/topic/5566#post23267
Still on Pagination http://www.elated.com/forums/topic/5565/#post23266 From: papadammy


Hi Matt, thanks for your help all this while. Please I still need your help. I saw the script below on the internet which I believe will help me in paginating my data but it is written using mysqli extension in mind and my code is purely pdo oriented, Please can you help me refactor it to work with pdo connection? It works fine as it is in mysqli.

The Pagination Class


Code:
--------------------
<?php
/**
* Paginator
* @desc Ajax pagination class
* @author Omar Abdallah
* @license GPL
* @version 1.5
* @todo add SQL_CALC_FOUND_ROWS
*/

class AjaxPaginator{

/**
* total pages found for this query
* @var integer
*/
public $totalPages;

/**
*
* @var integer
*/
public $recordsPerPage ='10';

/**
* Total records found from the query (without LIMIT)
* @var integer
*/
public $affected_rows;

/**
* current page id
* @var integer
*/
public $pageId;

/**
* the offset or the record to start from (used in the LIMIT clause)
* @var integer
*/
public $offset;

/**
* The raw query submitted by the user
* @var string
*/
private $query;

/**
* MySQLi connection Object
* @var object
*/
private $conn;

/**
* mysqli_result object made for more flexibility
* for more info: http://us.php.net/manual/en/class.mysqli-result.php
* @var object
*/
public $result;

/**
* the search query used in the like clause if it was specified
* @var string
*/
public $searchQuery='';

/**
* fields to search in
* @var string | array
*/
public $fields='';

/**
* How many links for the next and the previous
* @var integer
*/
public $linksCountLimit = 4;

/**
* Debug variable
* @var bool
*/
public $debug=false;

/**
* Group By clause
* @var string
*/
private $groupBy = '';

/**
* Order By clause
* @var string
*/
private $orderBy = '';


/**
*
* @param $in_pageID id of the current page
* @param $in_recordsPerPage number of records per page
* @param $in_query SQL query
* @param $in_conn database connection object(mysqli)
* @return
*/
function __construct($in_pageID=1,$in_recordsPerPage,$in_query,$in_conn){
$this->pageId = intval($in_pageID);
$this->recordsPerPage = $in_recordsPerPage;
$this->query = $in_query;
$this->conn = $in_conn;

// order by position
$orderbyPos = stripos($this->query,'ORDER BY');
if($orderbyPos !== FALSE){
$this->orderBy = " ". substr($this->query, $orderbyPos);
$this->query = substr($this->query, 0, $orderbyPos);
}
// group by position
$groupbyPos = stripos($this->query,'GROUP BY');
if($groupbyPos !== FALSE){
$this->groupBy = " ". substr($this->query,$groupbyPos);
$this->query = substr($this->query,0,$groupbyPos);
}
}

private function getAffectedRows(){
if (! empty ( $this->searchQuery )) {
$this->addSearch();
}
$result = $this->conn->query($this->query. $this->groupBy . $this->orderBy);

if($result== FALSE){
$err = 'Error: Cannot get affected rows';
if($this->debug){
$err .="<br /><b>Query: </b>". $this->query. $this->groupBy . $this->orderBy;
$err .="<br /><b>Error: </b>". $this->conn->error;
}
throw new Exception($err);
}

$affected_rows = $this->conn->affected_rows;
return $affected_rows;
}

/**
* The Core function which does the actual pagination
*
* @return array Associative array of rows returned
*/
public function paginate(){

$this->offset = $this->getOffest();

$this->affected_rows = $this->getAffectedRows();
$this->totalPages = $this->getTotalPages();

if($this->totalPages==0)$this->totalPages =1;

// construct the pagination query: in_query + groupby clause + order by clause + limit clause
$pageQ = $this->query . $this->groupBy . $this->orderBy. " LIMIT " . $this->offset . " , " . $this->recordsPerPage . ";";
if ($this->debug){
echo $pageQ;
}

$this->result = $this->conn->query ( $pageQ );
if ($this->result == false) {
$err = 'Error: Cannot Execute Pagination Query';
if($this->debug){
$err .="<br /><b>Query</b>". $pageQ;
}
throw new Exception ( $err );
}
$rows = array();
while ( $row = $this->result->fetch_assoc () ) {
$rows[] = $row;
}

return $rows;
}

/**
* Add search capability by manipulating the SQL query to handle the like clause
*
* @return
*/
private function addSearch(){
$this->searchQuery = $this->conn->real_escape_string ( $this->searchQuery );
if (is_array ( $this->fields )) {
$count = count ( $this->fields );
for($i = 0; $i < $count; $i ++) {
// its the first field we have to check for WHERE clause
if ($i == 0) {
if (stripos ( $this->query, 'WHERE' )) {
$this->query .= " AND ({$this->fields[0]} like '$this->searchQuery%'";
} else {
$this->query .= " WHERE ({$this->fields[0]} like '$this->searchQuery%'";
}
}else{
$this->query .= " OR {$this->fields[$i]} like '$this->searchQuery%'";
}
}
$this->query .= ") ";
} else {
// if only single field to search in
if (stripos ( $this->query, 'where' )) {
$this->query .= " AND name like '$this->searchQuery%'";
} else {
$this->query .= " WHERE name like '$this->searchQuery%'";
}
}
}

/**
* Gets the offset(start number of the LIMIT clause)
*
* @return string $offset
*/
private function getOffest(){
// multiply id with no_items_per_page
$offset = ($this->pageId - 1) * $this->recordsPerPage;
return $offset;
}

/**
* Get's the number of pages required to display the result
*
* @return string $totalPages
*/
public function getTotalPages(){
// return the float to higher integer ex:4.5 to 5,3.2 to 4
$totalPages= ceil($this->affected_rows/$this->recordsPerPage);

return $totalPages;
}

/**
* Generates the pagination links at the bottom of the page
* @param $class css class that will be added to the <a> tag
* @return string
*/
public function getLinks($class = "") {

$output = '';
// if the current page is not the first
if ($this->pageId > 1) {


$count = 1;
for($i = $this->pageId; $i >= 1; $i --) {
if ($count > $this->linksCountLimit)
break;

if ($i == $this->pageId)
continue;

$output = "<a href='?page={$i}' id='{$i}' class='{$class}'>{$i}</a>\r\n" . $output;

$count ++;
}

//previous page link
$prevPage = $this->pageId - 1;
$output = "<a href='?page={$prevPage}' id='{$prevPage}' class='"
. $class . "'>Previous</a>\r\n" . $output;

if ($prevPage > 1){
// first page link
$output = "<a href='?page=1' id='1' class='" . $class
. "'>First</a>\r\n" . $output;
}



}

$output .= "<span class='thispage'>{$this->pageId}</span>\r\n";

// next pages
$count = 1;
for($i = $this->pageId; $i < $this->totalPages; $i ++) {
if ($count > $this->linksCountLimit)
break;

if ($i == $this->pageId)
continue;

$output .= "<a href='?page={$i}' id='{$i}'
class='{$class}'>{$i}</a>\r\n";

$count ++;
}
// next and last links
if ($this->pageId < $this->totalPages) {
// next link
$next = $this->pageId + 1;
$output .= "<a href='?page={$next}' id='{$next}' class='{$class}'>Next</a>\r\n";

if ($this->totalPages != $next){
// last page link
$output .= "<a href='?page={$this->totalPages}' id='{$this->totalPages}' class='{$class}'>Last</a>\r\n";
}

}

return $output;
}
}

?>
--------------------


The testpage.php is below

Code:
--------------------
<?php
error_reporting(E_ALL);
include('ajaxpaginator.class.php');
// instantiate mysqli connection
$conn = new mysqli('localhost', 'root', '','test2') ;

$query = "SELECT * FROM customers";

$recordsPerPage = 5;//number of records per page
// page number, records per page, sql query, and the mysqli connection object
$paginator = new AjaxPaginator('1',$recordsPerPage,$query,$conn);
$paginator->debug = true;
try{
$rows = $paginator->paginate();
}catch (Exception $e){
echo $e->getMessage();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<link href="style.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.paginate.js"></script>
<script type="text/javascript">
$(document).ready (function () {
$('#srch_btn').click(function () {
$('#listing_container').Paginate();
return false;
});

$('.paginator a').click(function () {
$('#listing_container').Paginate(this.id);
return false;
});


});
</script>

</head>
<body>
<div id="wrapper">
<div id='search-box' class="search-box">
<form action="" method="get">
<input id="search" type="text" class="search" />
<?php
$getArray = array();
parse_str($_SERVER['QUERY_STRING'],$getArray);

foreach($getArray as $key=>$value){

echo "<input type='hidden' name='{$key}' id='{$key}' value='{$value}' />";
}
?>
<input id="srch_btn" type="submit" value="search" class="button" />
</form>
</div>
<br class="clear" />
<div id="listing_container">



<table border="0" cellpadding="2" cellspacing="0" class="listing">
<tr>
<th nowrap="nowrap" width="40"> ID</th>
<th nowrap="nowrap" width="450" align='left'>Name</th>
</tr>
<?php

foreach($rows as $row){
echo "<tr>";
echo "<td nowrap='nowrap' align='center'>{$row['id']}</td>";
echo "<td nowrap='nowrap' align='left'>{$row['name']}</td>";
echo "</tr>";
}

echo "</table><br />";
$links = $paginator->getLinks ();
echo "<div class='paginator'> " . $links ;

echo "<p>Page " . $paginator->pageId . " of " . $paginator->totalPages . "</p>";

?>
</div>
</div>
</div>
</body>
</html>
--------------------


The mysql dump is below to make the testing easier for you.


Code:
--------------------
-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 09, 2009 at 08:54 AM
-- Server version: 5.1.33
-- PHP Version: 5.2.9

SET FOREIGN_KEY_CHECKS=0;

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `test2`
--

-- --------------------------------------------------------

--
-- Table structure for table `customers`
--
-- Creation: Aug 08, 2009 at 11:33 PM
-- Last update: Aug 08, 2009 at 11:34 PM
--

CREATE TABLE IF NOT EXISTS `customers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin5 AUTO_INCREMENT=61 ;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `name`) VALUES
(1, 'alicia Chaffin'),
(2, 'norman Whitten'),
(3, 'howard Cottrell'),
(4, 'natalie Mccollum'),
(5, 'jesse Polanco'),
(6, 'carl Santiago'),
(7, 'craig Chapman'),
(8, 'helen Raab'),
(9, 'carl Lavin'),
(10, 'vanessa Rankins'),
(11, 'douglas Pedigo'),
(12, 'steve Hartfield'),
(13, 'Wegner Pedigo'),
(14, 'christy Sinclair'),
(15, 'jack Kovacs'),
(16, 'bonnie Ivory'),
(17, 'william Allen'),
(18, 'juan Pino'),
(19, 'megan Godin'),
(20, 'bernice Mackie'),
(21, 'douglas Watters'),
(22, 'genevieve Slater'),
(23, 'ralph Aucoin'),
(24, 'virginia Kwon'),
(25, 'Godoy Larson'),
(26, 'frank Villatoro'),
(27, 'anthony Hintz'),
(28, 'johnny Manzo'),
(29, 'joe Dix'),
(30, 'michael Litchfield'),
(31, 'priscilla Weimer'),
(32, 'charles Godwin'),
(33, 'victoria Doney'),
(34, 'irene Petry'),
(35, 'william Byler'),
(36, 'ronald Auger'),
(37, 'steve Tedder'),
(38, 'theresa Goodale'),
(39, 'adam Verdugo'),
(40, 'glenn Simard'),
(41, 'louis Woodring'),
(42, 'phyllis Arbogast'),
(43, 'janice Ripley'),
(44, 'amy Mcginnis'),
(45, 'phillip Wiser'),
(46, 'patrick Perrotta'),
(47, 'crystal Ridenhour'),
(48, 'nathan Ober'),
(49, 'molly Pitzer'),
(50, 'jonathan Tubbs'),
(51, 'Leary Levin'),
(52, 'cathy Pierre'),
(53, 'victoria Searle'),
(54, 'adam Gaskin'),
(55, 'debra Centeno'),
(56, 'kristi Hassan'),
(57, 'marsha Schaffer'),
(58, 'gerald Wrenn'),
(59, 'howard Levin'),
(60, 'ana Larson');

SET FOREIGN_KEY_CHECKS=1;

--------------------



Please just help me make it what can work in php pdo. Thanks in advance.

View » | Reply »

]]>
Mon, 24 Dec 2012 12:58:24 GMT http://www.elated.com/forums/topic/5565#post23266
Re: Using CSS To Center Content http://www.elated.com/forums/topic/4726/#post23265 From: earthtoMegatron


Perfectly short standard article to refer to for centering. Thanks

View » | Reply »

]]>
Sat, 22 Dec 2012 08:43:42 GMT http://www.elated.com/forums/topic/4726#post23265
Re: Easy HTML Templates with Mustache http://www.elated.com/forums/topic/5480/#post23264 From: chrishirst


That statement is a closing paranthesis short.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Thu, 20 Dec 2012 14:35:05 GMT http://www.elated.com/forums/topic/5480#post23264
Re: Pagination Problem http://www.elated.com/forums/topic/5554/#post23263 From: papadammy


Thanks a lot Matt. Merry Xmas and happy new year in advance.

View » | Reply »

]]>
Thu, 20 Dec 2012 13:51:11 GMT http://www.elated.com/forums/topic/5554#post23263
Re: Drag-and-Drop with jQuery: Your Essential Guide http://www.elated.com/forums/topic/5136/#post23262 From: peterbrowne


Many thanks for this great tutorial!! I would like to create the slot divs arranged in a circle, perhaps using the following:



Code:
--------------------
<script type="text/javascript">
$(document).ready(function(){
var radius = 200; // radius of the circle
var fields = $('.field'),
container = $('#container'),
width = container.width(),
height = container.height(),
angle = 0,
step = (2*Math.PI) / fields.length;
fields.each(function() {
var x = Math.round(width/2 + radius * Math.cos(angle) - $(this).width()/2),
y = Math.round(height/2 + radius * Math.sin(angle) - $(this).height()/2);
$(this).css({
left: x + 'px',
top: y + 'px'
});
angle += step;
});
});
</script>

</head>

<body>
<div id="container">
<!-- <div id="center"></div>
<div id="crosshair-x"></div>
<div id="crosshair-y"></div>-->
<div class="field">1</div>
<div class="field">2</div>
<div class="field">3</div>
<div class="field">4</div>
<div class="field">5</div>
<div class="field">6</div>
<div class="field">7</div>
<div class="field">8</div>
<div class="field">9</div>
</div>
--------------------


Any ideas on how I can incorporate this into the drag and drop code so that it works with 9 slots and cards arranged in a circle?

[Edited by peterbrowne on 20-Dec-12 02:11]

View » | Reply »

]]>
Thu, 20 Dec 2012 07:18:57 GMT http://www.elated.com/forums/topic/5136#post23262
Re: A Snazzy Animated Pie Chart with HTML5 and jQuery http://www.elated.com/forums/topic/5000/#post23261 From: spillsome


var mouseX = clickEvent.pageX - this.offsetLeft;
var mouseY = clickEvent.pageY - this.offsetTop;

The code above will not work if the canvas is inside a <td> for example.
So i suggest the following modification :

var p = $('#' + name);
var offset = p.offset();
var mouseX = clickEvent.pageX - offset.left
var mouseY = clickEvent.pageY - offset.top

View » | Reply »

]]>
Wed, 19 Dec 2012 10:11:54 GMT http://www.elated.com/forums/topic/5000#post23261
Re: Easy HTML Templates with Mustache http://www.elated.com/forums/topic/5480/#post23260 From: philatnotable


Thanks Matt,

I can get Mustache to work, following your direction, up until I try to turn this:

return ( array ( "results" => $list, "totalRows" => $totalRows[0] )

into a simple Mustache ready array.

Regards, Phil

View » | Reply »

]]>
Wed, 19 Dec 2012 05:58:10 GMT http://www.elated.com/forums/topic/5480#post23260
Re: Pagination Problem http://www.elated.com/forums/topic/5554/#post23259 From: matt


@papadammy: You're welcome. Feel free to ask if you need any more help!

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 01:19:41 GMT http://www.elated.com/forums/topic/5554#post23259
Re: A special emailing system http://www.elated.com/forums/topic/5564/#post23258 From: matt


@papadammy: Lots of ways to do it, but take a look at the PEAR Mail_Mime package:

http://pear.php.net/package/Mail_Mime/

This gives you an easy way to compose and send rich email messages with attachments etc.

Example: http://pear.php.net/manual/en/package.mail.mail-mime.example.php

Hope that helps!

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 01:16:48 GMT http://www.elated.com/forums/topic/5564#post23258
Re: How to Start a Blog http://www.elated.com/forums/topic/4718/#post23257 From: matt


@Jonny Rae: It depends how seriously you think you'll be blogging in the future. It can be a pain to set up redirects from one blog to the next, and your blog's Google rankings could suffer (either short or long term).

If you think you might make a business out of it at any point then I would personally start with self-hosted.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 01:11:22 GMT http://www.elated.com/forums/topic/4718#post23257
Re: Easy HTML Templates with Mustache http://www.elated.com/forums/topic/5480/#post23256 From: matt


@philatnotable: Never done it, but it should be straightforward. Grab the PHP implementation here: https://github.com/bobthecow/mustache.php

Then just create your Mustache templates in the CMS templates folder, and replace the simple template require() calls in the PHP code with calls to $m->render(), passing in the loaded template and an array containing the appropriate variables for the template.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 01:08:14 GMT http://www.elated.com/forums/topic/5480#post23256
Re: A Snazzy Animated Pie Chart with HTML5 and jQuery http://www.elated.com/forums/topic/5000/#post23255 From: matt


@sampada: Can you post the URL of your chart page so we can see the problem?

I answered your second question here: http://www.elated.com/forums/topic/5000/#post21904

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 01:02:38 GMT http://www.elated.com/forums/topic/5000#post23255
Re: Cover Flow Remade with CSS and jQuery http://www.elated.com/forums/topic/5199/#post23254 From: matt


@andrealing: Glad you like it! I expect you're running into memory issues on your mobile devices, since these browsers have a lot less RAM available. The only workaround I can think of would be to dynamically load the images on an as-needed basis, then remove the image objects from memory when they've gone out of view. But this would of course involve more network traffic and slower response times as the user scrolls back and forth through the gallery.

The easier solution would be to split your photos into multiple galleries

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 00:54:17 GMT http://www.elated.com/forums/topic/5199#post23254
Re: How to Add Article Categories to Your CMS http://www.elated.com/forums/topic/5391/#post23253 From: matt


@lyall: I'd probably edit config.php and replace the TEMPLATE_PATH constant with TEMPLATE_PATH_DESKTOP and TEMPLATE_PATH_MOBILE. Then add a simple getTemplatePath() utility function to config.php that detects the browser type and returns the appropriate template path. Then replace all instances of TEMPLATE_PATH in the code with getTemplatePath().

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Wed, 19 Dec 2012 00:50:53 GMT http://www.elated.com/forums/topic/5391#post23253
Re: Pagination Problem http://www.elated.com/forums/topic/5554/#post23252 From: papadammy


Thanks Matt. I'm still developing the application locally on my system, hence there is no way of posting the link. I think I will simply look for another pagination script on the net and use for the project. Thanks for being nice and a great mentor. You are making impact.

View » | Reply »

]]>
Tue, 18 Dec 2012 13:28:05 GMT http://www.elated.com/forums/topic/5554#post23252
Re: Creating a dropdown menu in Wordpress http://www.elated.com/forums/topic/5559/#post23251 From: matt


@ohemgee: Seems to work OK for me - I guess you got it working?

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Mon, 17 Dec 2012 22:06:21 GMT http://www.elated.com/forums/topic/5559#post23251
Re: Pagination Problem http://www.elated.com/forums/topic/5554/#post23250 From: matt


@papadammy: I'm sorry to hear about your brother, that's terrible news.

I don't know how this pagination script works so it's difficult for me to help. Can you post the URL of the page with the problem so we can see what the problem is exactly?

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Mon, 17 Dec 2012 22:04:16 GMT http://www.elated.com/forums/topic/5554#post23250
Re: How to Make a Slick Ajax Contact Form with jQuery and PHP http://www.elated.com/forums/topic/5171/#post23249 From: matt


@gurkin: The tutorial isn't a lesson in how to prevent SQL injection (it doesn't even use a database). It's a tutorial showing how to use Ajax with jQuery and PHP to send an email message.

If you want to adapt the PHP script to insert data into an SQL database then you'll need to take your own precautions against injection attacks. I recommend using PDO with bound parameters.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Mon, 17 Dec 2012 22:00:59 GMT http://www.elated.com/forums/topic/5171#post23249
Re: Drag-and-Drop with jQuery: Your Essential Guide http://www.elated.com/forums/topic/5136/#post23248 From: matt


@goldilaks You're welcome - thanks for your feedback.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Mon, 17 Dec 2012 21:52:25 GMT http://www.elated.com/forums/topic/5136#post23248
Re: How to Add Image Uploading to Your CMS http://www.elated.com/forums/topic/5492/#post23247 From: matt


@jvt4: Yes that seems like the right idea to me.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Mon, 17 Dec 2012 21:51:02 GMT http://www.elated.com/forums/topic/5492#post23247
Re: Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post23246 From: matt


@Geraki: See http://www.laszlo.nu/post/34159352/how-to-use-utf-8-with-mysql-and-php-data-objects-pdo

You shouldn't call "set character_set_database='utf8'" manually at all - see: http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_character_set_database

Just make sure you create your tables using the utf8_unicode_ci collation.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/


View » | Reply »

]]>
Mon, 17 Dec 2012 21:46:41 GMT http://www.elated.com/forums/topic/5114#post23246
A special emailing system http://www.elated.com/forums/topic/5564/#post23245 From: papadammy


I want to create a system using php oop that acts like what banks use to send account statements to their customers every month end. I have been able to dynamically create pdf using fpdf by extracting info from the mysql database. I want a situation in which at the click of a button, pdfs will be generated on the fly from the database and sent as an attachment to each of the email address of the parent of each student in my application with the main body of the emails personalized for each student based on their info in the databse. How do I do this using php oop? What are the steps involved and how will such activity not affect the server so much? Any advice will be worked upon. Thanks in advance.

View » | Reply »

]]>
Fri, 14 Dec 2012 13:22:12 GMT http://www.elated.com/forums/topic/5564#post23245
Re: PHP Anonymous Functions: What Are They, and Why Use Them? http://www.elated.com/forums/topic/5562/#post23242 From: chrishirst


name??

That line is the equvalent of



Code:
--------------------
<?php>
if($A < $B) {
return -1;
} else {
return 1;
}
?>
--------------------


--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Tue, 11 Dec 2012 19:39:24 GMT http://www.elated.com/forums/topic/5562#post23242
Re: PHP Anonymous Functions: What Are They, and Why Use Them? http://www.elated.com/forums/topic/5562/#post23239 From: daveporter


Thanks for article...
Some of it is a bit over my head, but I get the general gist!
One thing that has me confused is the usort example.
Should this line:
return ( $personA["age"] < $personB["age"] ) ? -1 : 1;
Have "name" for $personA ?
Cheers, Dave

View » | Reply »

]]>
Tue, 11 Dec 2012 04:42:49 GMT http://www.elated.com/forums/topic/5562#post23239
Re: How to Start a Blog http://www.elated.com/forums/topic/4718/#post23238 From: Jonny Rae


Hi!

Thanks for the fantastic guide, and I apologise for commenting on an old post.

Like the previous poster I am wondering about transferring the blog so that I'm hosting it myself in the future.

However, I've never blogged before, so would it be a good idea to start with a Wordpress-hosted blog to see if it's for me, before perhaps moving it to my own hosted Wordpress blog further down the line if I wish to consider allowing advertising on it?

This way I wouldn't have to fork out for hosting costs initially - a try before you buy sort of thing.

Thanks in advance.

Regards,

Jonny

View » | Reply »

]]>
Mon, 10 Dec 2012 16:03:58 GMT http://www.elated.com/forums/topic/4718#post23238
Re: Pagination Problem http://www.elated.com/forums/topic/5554/#post23237 From: papadammy


Matt and Chris, thanks a lot for your help. The code worked but it didn't split my result as desired. Instead of showing me 10 results per page, it still displayed all the 21 results I have in the database although, it created the link for 3 pages at the base of the page. I set the default items per page to 10. Is there any way out of this? Thanks in advance.

View » | Reply »

]]>
Mon, 10 Dec 2012 12:57:29 GMT http://www.elated.com/forums/topic/5554#post23237
PHP Anonymous Functions: What Are They, and Why Use Them? http://www.elated.com/forums/topic/5562/#post23236 From: Elated


This is a forum topic for discussing the article "PHP Anonymous Functions: What Are They, and Why Use Them?":

http://www.elated.com/articles/php-anonymous-functions/

Learn how to create and use anonymous functions, callbacks and closures in PHP.

View » | Reply »

]]>
Mon, 10 Dec 2012 06:00:00 GMT http://www.elated.com/forums/topic/5562#post23236
Re: Easy HTML Templates with Mustache http://www.elated.com/forums/topic/5480/#post23235 From: philatnotable


Matt

Please, could you redo this tutorial but in PHP?

Thanks again

Phil

View » | Reply »

]]>
Sun, 09 Dec 2012 01:55:54 GMT http://www.elated.com/forums/topic/5480#post23235
Re: Easy HTML Templates with Mustache http://www.elated.com/forums/topic/5480/#post23234 From: philatnotable


Matt

Great tutorial.
What is the best way to use Mustache with your 'CMS in an Afternoon'?

Thanks
Phil

View » | Reply »

]]>
Sat, 08 Dec 2012 23:57:56 GMT http://www.elated.com/forums/topic/5480#post23234
Re: A Snazzy Animated Pie Chart with HTML5 and jQuery http://www.elated.com/forums/topic/5000/#post23233 From: sampada


The chart is very nice. But, i have some issues and need suggestion from you. Actually in my page, the click event on chart does not work. I think the problem is with div element of the chart. Because if i click outside of chart in the canvas, the toggleslice is called but when i click on chart it does not work. Any suggestions? From the table chart handler works perfectly fine. If you want i can give you my page. Also, I need to display 3 charts on a same page. So do i have to write 3 different init functions or is there any one function that works?

--
Sampada

View » | Reply »

]]>
Fri, 07 Dec 2012 14:04:23 GMT http://www.elated.com/forums/topic/5000#post23233
Re: Cover Flow Remade with CSS and jQuery http://www.elated.com/forums/topic/5199/#post23226 From: andrealing


Hi,

Great script!

However, when I add many photos (I have hundreds), it works OK on the PC but dumps out both on the iPad and Android.

Any fix on this?

Thanks so much!

Warmest regards~

View » | Reply »

]]>
Wed, 05 Dec 2012 10:36:46 GMT http://www.elated.com/forums/topic/5199#post23226
Re: How to Add Article Categories to Your CMS http://www.elated.com/forums/topic/5391/#post23225 From: lyall


Hi, i've been implementing this tutorial into mysite and all the php is working fine, however I have two versions of my site one for mobile one for desktop so if a mobile browser is detected it will go to the mobile verison of my site now ive modified all the template files to suite my mobile design problem now is the desktop version is using the same template files im new to templating with php how would I go about sorting this out?

View » | Reply »

]]>
Tue, 04 Dec 2012 15:11:06 GMT http://www.elated.com/forums/topic/5391#post23225
Re: How to Make a Slick Ajax Contact Form with jQuery and PHP http://www.elated.com/forums/topic/5171/#post23224 From: chrishirst


In that case




"Another thing... the current email validation isn't really a validation... sdsd@q is not an email, is it? "

What is the question?

Because that is the one I answered.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Tue, 04 Dec 2012 09:20:41 GMT http://www.elated.com/forums/topic/5171#post23224
Re: How to Make a Slick Ajax Contact Form with jQuery and PHP http://www.elated.com/forums/topic/5171/#post23222 From: hellolittlebro


@chris

you just proved what kind of lousy programmer you are. What are you talking about, shall I send you my code I have on another form, a form which I actually USE!
?
Gee, another "professional" (spammer, hacker, phisher >>> ??? )! Can only be one fo these, to keep your doors open you lie at other! We know how you folks work. but not everyone is as dumb as you'd hope!

[Edited by hellolittlebro on 03-Dec-12 20:40]

--
Nothing isnt really something if there isnt anything.

View » | Reply »

]]>
Tue, 04 Dec 2012 02:38:05 GMT http://www.elated.com/forums/topic/5171#post23222
Re: How to Make a Slick Ajax Contact Form with jQuery and PHP http://www.elated.com/forums/topic/5171/#post23221 From: chrishirst


You can't "validate" an email address until you send the message and it doesn't "bounce".

All validators of any kind do is check that the string entered has the '.'s and the '@' in the right places, and does not contain any 'illegal' characters.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Mon, 03 Dec 2012 23:45:54 GMT http://www.elated.com/forums/topic/5171#post23221
Re: Adding a WYSIWYG HTML Editor to Your Site http://www.elated.com/forums/topic/4839/#post23220 From: chrishirst


http://www.tizag.com/phpT/filewrite.php

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]]>
Mon, 03 Dec 2012 23:23:47 GMT http://www.elated.com/forums/topic/4839#post23220
Re: Adding a WYSIWYG HTML Editor to Your Site http://www.elated.com/forums/topic/4839/#post23218 From: Richard_Paul


Hi-Thanks for this nice tutorial (from wayback when-December 2009!).
I am looking at tinymce editor at the moment.
Currently I am echoing the editor content in form_handler.php with:

Code:
--------------------
<?php
/* post.php : this page shows what insert.php has sent */
echo(stripslashes($_POST['articleContent']));
?>
--------------------

I really want to try & save the editor content to a file but this is proving difficult for me (see my post on StackOverflow here:
http://stackoverflow.com/questions/13660978/saving-tinymce-textarea-content-to-file/13662092#comment18751239_13662092

[Edited by Richard_Paul on 02-Dec-12 11:15]

View » | Reply »

]]>
Sun, 02 Dec 2012 17:14:31 GMT http://www.elated.com/forums/topic/4839#post23218
Re: How to Make a Slick Ajax Contact Form with jQuery and PHP http://www.elated.com/forums/topic/5171/#post23217 From: hellolittlebro


Another thing... I added a message styling and also included the "msg" in the header, but nothing gets sent

Another thing... the current email validation isn't really a validation... sdsd@q is not an email, is it? So I changed the reg

Code:
--------------------
/[^\.\-\' a-zA-Z0-9]/
--------------------

to

Code:
--------------------
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
--------------------

but it still gets validated the old way.

Yes - I cleared cookies and even flushed the cache, tried other browsers I haven't opened it before and all the same ...

Hm... nice as it is but try to add anything, nothing!

So after all, I guess it's only for people who use it as is and don't bother about security, hijacking, etc. at all. ... perfect for the FaceBook crowd

--
Nothing isnt really something if there isnt anything.

View » | Reply »

]]>
Sat, 01 Dec 2012 11:56:13 GMT http://www.elated.com/forums/topic/5171#post23217
Creating a dropdown menu in Wordpress http://www.elated.com/forums/topic/5559/#post23216 From: ohemgee


Hi there

I'm having a nightmare trying to figure out how to edit the CSS for dropdown menu here: http://www.passionwhisperer.co.uk/hot-shop-free/

As you can see, there are two main issues:

1. I need the whole area of 'test' to be clickable, rather than the little black arrow (which is a background image).

2. I need to change the background colour of the dropdown menu.

3. Once clicked, the dropdown menu doesn't go away when you move to another page - I need to change that too!

I'm familiar with HTML and some CSS but this has me truly stuck so any replies would be most welcome!

View » | Reply »

]]>
Sat, 01 Dec 2012 00:58:26 GMT http://www.elated.com/forums/topic/5559#post23216