PHP - Jquery Click Handler Problem
I have a click handler that is causing some problem. I am using hammer.js for a slider.
This is the link http://ingrub.com/iphone/
When you hit the last slide the text of next changes to let's grub, but the problem is that if you swipe back to an earlier screen and you try to go next it automatically goes to the link instead of going to the next slide these are some of the functions that i am using
this.showPane = function(index, animate) { // between the bounds index = Math.max(0, Math.min(index, pane_count-1)); current_pane = index; var offset = -((100/pane_count)*current_pane); setContainerOffset(offset, animate); if(current_pane == 2){ $(".next2").text("Let's Grub"); $(".navigation2").addClass('linkMe'); } else { $(".next2").text("Next"); $(".navigation2").removeClass('linkMe'); } }; $( ".next2" ).click(function() { carousel.next(); $('.linkMe').click(function() { window.location = "discover.html"; }); return false; });I am not sure what to do to fix this bug. Similar TutorialsThis topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=358574.0 I have a while loop fucntion displaying a list of records, each while records contains a hidden div with additional infomation and a button that will call JQuery slideToggle() function. each button on each record toggles alll the hidden divs. Does anyone have any ideas on how to sort this issue? So i'm sending id value trough post in json format. When i open Firebug it returns the correct value but in php it's keep returning null. Code: [Select] $('.stars').bind('click', function() { var star = this; var data = {'q' : $(star).attr('id') }; $.ajax({ type:'post', url:"voting.php", data:data, dataType:'json' }); return false; }); Code: [Select] <?php $q=$_POST['q']; echo json_encode($q); ?> Hi Y'all I have a contact form page with a contact-handler.php for emailing the details to my email address. I have the site uploaded on the net for the php and submission of the message fields to work and it seems to submit the message fine (simple contact form... name, email and message) but i never receive the email of the users message?? I have searched this forum before i posted this and there was one message on this topic however i could not make sense of the reply.. guy typs lke this lnguage wit misn words? madness. Anyways i know a guy mentioned gmail and yahoo might be backlist but surely not for days? the email is not in my spam folder either.. heres the snippet of my code, massively appreciate any help. <?php $errors = ''; $myemail = 'croz27@gmail.com'; if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) { $errors .= "\n Error: all fields are required"; } $name = $_POST['name']; $email_address = $_POST['email']; $message = $_POST['message']; if (!eregi( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email_address)) { $errors .= "\n Error: Invalid email address"; } if( empty($errors)) { $to = $myemail; $email_subject = "Contact form submission: $name"; $email_body = "You have received a new message. ". " Here are the details:\n Name: $name \n Email: $email_address \n Message \n $message"; $headers = "From: $myemail"; $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); //redirect to the 'thank you' page header('Location: contact-form-thank-you.html'); } ?> Thanks for any input. ps. I have left in my real email address incase gmail has any conflicts with this ... croz27 hey there peoples i have a bit of a problem with my php code. when i click on the name it wont play the video. but if i click on the thumbnail it plays here is the code Code: [Select] echo "<div class='Video_thumbnail'>"; echo "<a href='/Video.php?id={$row['id']}'>"; echo "<img src='http://i.ytimg.com/vi/{$row['link']}/hqdefault.jpg' width='220' height='170' alt='click' /></a>"; echo "<br>"; echo "</br>"; echo "<a href='/Video.php?={$row['id']}'>"; echo "{$row['navn']}</a>"; echo "</div>"; Hi, I have been trying to find an up-to-date bounce mail handler for PHP but so far everything I've found seems to be extremely dated. Two common suggestions are the bounce handler at http://www.phpclasses.org/package/2691-PHP-Parse-bounced-e-mail-message-reports.html , or the PHP Mailer-BMH, http://phpmailer.worxware.com/index.php?pg=bmh . I know for certain that PHP Mailer-BMH is dated and no longer a viable solution, and I believe the PHP classes solution is also dated. Does anyone know of a current bounce mail handler? Preferably it would include the functionality to connect to a remote mailbox so I won't have to do this myself. Thanks for any help. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=353342.0 Hi guys, first time on forum, and in desperate need of help. I asked my co workers and they don't have a single clue into what is going wrong. I built a PHP image handler to secure images down to the user too see. When I integrate this into the ajax however, the images only load on the page after all the ajax requests finish. In this case there are 4 ajax requests. I have attached screenshots of the problem before all the ajax requests finish and after. NOTE: This works fine with images that are not being generated PHP. At first I thought it might be a header problem with the image handler but I cant seem to find any people who have seen this problem. Here is the code. class SecureImage { public $user_img_dir; public $db_img_dir; public $temp_img_dir; public $main_img_dir; function __construct(){ global $SESSION; //set the class vars $this->temp_img_dir = BASE_PATH.'webdocs/images/_temp/'; $this->main_img_dir = '/var/images/'; //now check to see if there is a directory for this file //build the directory for the image $user_id = $SESSION->getUserid(); $db_name = $GLOBALS['Config']->db['db_name']; $user_img_dir = "{$this->main_img_dir}{$db_name}/{$user_id}/"; $db_img_dir = $this->main_img_dir.$db_name."/"; //set the class vars $this->user_img_dir = $user_img_dir; $this->db_img_dir = $db_img_dir; //now check to see if the directory is there if(!is_dir($user_img_dir)){ //check to see if the db_name is a dir if(!is_dir($db_img_dir)){ //make the directory mkdir($db_img_dir); } //now make the user id dir mkdir($user_img_dir); } } public function getImage($img){ $img_array = explode('.', $img); switch($img_array[1]){ case 'jpg': case 'jpeg': header('Content-Type: image/jpeg'); break; case 'png': header('Content-Type: image/png'); break; case 'gif': header('Content-Type: image/gif'); break; } header('Content-Disposition: inline;'); //get the file size $img_size = filesize($this->user_img_dir.$img); header('Content-Length: '.$img_size); echo readfile($this->user_img_dir.$img); } } If anyone has any ideas, much appreciated. Good Day, I'm using the following example script from http://php.net/manual/en/function.session-set-save-handler.php which I have placed in session-handler.php and is included at the top of my index.php file. I have multiple domain names for the same website, so naturally when a person logs into the site, I would like the session to be active across all the domains instead of them having to login again if say they go from mysite.com to mysite2.com. session-handler.php <?php function open($save_path, $session_name) { global $sess_save_path; $sess_save_path = $save_path; return(true); } function close() { return(true); } function read($id) { global $sess_save_path; $sess_file = "$sess_save_path/sess_$id"; return (string) @file_get_contents($sess_file); } function write($id, $sess_data) { global $sess_save_path; $sess_file = "$sess_save_path/sess_$id"; if ($fp = @fopen($sess_file, "w")) { $return = fwrite($fp, $sess_data); fclose($fp); return $return; } else { return(false); } } function destroy($id) { global $sess_save_path; $sess_file = "$sess_save_path/sess_$id"; return(@unlink($sess_file)); } function gc($maxlifetime) { global $sess_save_path; foreach (glob("$sess_save_path/sess_*") as $filename) { if (filemtime($filename) + $maxlifetime < time()) { @unlink($filename); } } return true; } session_set_save_handler("open", "close", "read", "write", "destroy", "gc"); session_start(); ?> The script above doesn't appear to be throwing any errors, and I can login like normal but it doesn't seem to be saving the sessions at all. So I still have to login to each separate domain. Any ideas? Thanks, Ace This is my first post on your forums. I've some problems with a registration form that I've been trying to work out for 2+ days now, asking about it here is a last resort - I have a config.php file located at config/config.php there's a register.php file in the sites root directory and a includes/form_handlers/register.php
My config.php file is: <?php ob_start(); session_start(); $timezone = date_default_timezone_set("America/Cancun"); $servername = "localhost"; $username = "root"; $password = ""; $database = "social"; $conn = mysqli_connect($servername, $username, $password, $database); if (mysqli_connect_error()) { echo "Failed to connect: " . mysqli_connect_error(); } ?> This is my register.php file: <?php require 'config/config.php'; require 'includes/form_handlers/register.php'; ?> <!-- REMOVED THE <HEAD> SECTION --> <body class="login-img3-body"> <div class="container"> <form class="login-form" action="includes/form_handlers/register.php" method="POST"> <div class="login-wrap"> <p class="login-img"><i class="icon_lock_alt"></i></p> <div class="input-group"> <span class="input-group-addon"><i class="icon_profile"></i></span> <input type="text" class="form-control" name="fname" placeholder="First Name" value="<?php if(isset($_SESSION['fname'])) { echo $_SESSION['fname']; } ?>" required> <br> <?php if(in_array("Your first name must be 2-50 characters long.<br>", $error_array)) echo "<span style='color: #AD0303;'>Your first name must be 2-50 characters long.</span><br>"; ?> </div> <div class="input-group"> <span class="input-group-addon"><i class="icon_profile"></i></span> <input type="text" class="form-control" name="lname" placeholder="Last Name" value="<?php if(isset($_SESSION['lname'])) { echo $_SESSION['lname']; } ?>" required> <br> <?php if(in_array("Your last name must be 2-50 characters long.<br>", $error_array)) echo "<span style='color: #AD0303;'>Your last name must be 2-50 characters long.</span><br>"; ?> </div> <div class="input-group"> <span class="input-group-addon"><i class="icon_mail_alt"></i></span> <input type="text" class="form-control" name="email" placeholder="Email" value="<?php if(isset($_SESSION['email'])) { echo $_SESSION['email']; } ?>" required> </div> <div class="input-group"> <span class="input-group-addon"><i class="icon_mail_alt"></i></span> <input type="text" class="form-control" name="email2" placeholder="Confirm Email" value="<?php if(isset($_SESSION['email2'])) { echo $_SESSION['email2']; } ?>" required> <br> <?php if(in_array("Email already in use<br>", $error_array)) echo "<span style='color: #AD0303;'>Email already in use</span><br>"; else if(in_array("Invalid Email<br>", $error_array)) echo "<span style='color: #AD0303;'>Invalid Email</span><br>"; else if(in_array("Emails don't match<br>", $error_array)) echo "<span style='color: #AD0303;'>Emails don't match</span><br>"; ?> </div> <div class="input-group"> <span class="input-group-addon"><i class="icon_key_alt"></i></span> <input type="password" class="form-control" name="pwd" placeholder="Password" required> </div> <div class="input-group"> <span class="input-group-addon"><i class="icon_key_alt"></i></span> <input type="password" class="form-control" name="pwd2" placeholder="Confirm Password" required> <br> <?php if(in_array("Your passwords don't match.<br>", $error_array)) echo "<span style='color: #AD0303;'>Your passwords don't match.</span><br>"; else if(in_array("Your password must contain English characters or numbers.<br>", $error_array)) echo "<span style='color: #AD0303;'>Your password must contain English characters or numbers.</span><br>"; else if(in_array("Your password must be 5-30 characters long.<br>", $error_array)) echo "<span style='color: #AD0303;'>Your password must be 5-30 characters long.</span><br>"; ?> </div> <input class="btn btn-info btn-lg btn-block" type="submit" name="register" value="Register"> </div> <?php if(in_array("<span style='color: #14C800;'>You're all set! Go ahead and login!</span><br>", $error_array)) echo "<span style='color: #14C800;'>You're all set! Go ahead and login!</span><br>"; ?> </form> </div> </body> </html> and my includes/form_handlers/register.php file: <?php //error variables $fname = ""; $lname = ""; $email = ""; $email2 = ""; $pwd = ""; $pwd2 = ""; $date = ""; $error_array = array(); if(isset($_POST['register'])) { //form values $fname = clean($_POST['fname']); $_SESSION['fname'] = $fname; $lname = clean($_POST['lname']); $_SESSION['lname'] = $lname; $email = clean($_POST['email']); $_SESSION['email'] = $email; $email2 = clean($_POST['email2']); $_SESSION['email2'] = $email2; $pwd = strip_tags($_POST['pwd']); $pwd2 = strip_tags($_POST['pwd2']); $date = date('Y-m-d'); //signup date if($email == $email2) { //validate email format if(filter_var($email, FILTER_VALIDATE_EMAIL)) { $email = filter_var($email, FILTER_VALIDATE_EMAIL); //does email exist?? $email_check = mysqli_query($conn, "SELECT email FROM users WHERE email='$email'"); //number of rows returned $num_rows = mysqli_num_rows($email_check); if($num_rows > 0) { array_push($error_array, "Email already in use<br>"); } } else { array_push($error_array, "Invalid Email<br>"); } } else { array_push($error_array, "Emails don't match<br>"); } //first name length if(strlen($fname) > 50 || strlen($fname) < 2) { array_push($error_array, "Your first name must be 2-50 characters long.<br>"); } //last name length if(strlen($lname) > 50 || strlen($lname) < 2) { array_push($error_array, "Your last name must be 2-50 characters long.<br>"); } if($pwd != $pwd2) { array_push($error_array, "Your passwords don't match.<br>"); } else { if(preg_match('/[^A-Za-z0-9]/', $pwd)) { array_push($error_array, "Your password must contain English characters or numbers.<br>"); } } if(strlen($pwd) > 30 || strlen($pwd) < 2) { array_push($error_array, "Your password must be 5-30 characters long.<br>"); } if(empty($error_array)) { $pwd = md5($pwd); //encrypts password $username = strtolower($fname . "_" . $lname); $check_username = mysqli_query($conn, "SELECT username FROM users WHERE username='$username'"); //assign unique username if original is taken $snum = 0; while(mysqli_num_rows($check_username) != 0) { $snum++; $username = $username . "00" . $snum; $check_username = mysqli_query($conn, "SELECT username FROM users WHERE username='$username'"); } //assign a random profile pic $rand = rand(1,3); switch ($rand) { case '1': $profile_pic = "assets/images/profile_pics/default/01.jpeg"; break; case '2': $profile_pic = "assets/images/profile_pics/default/02.jpeg"; break; case '3': $profile_pic = "assets/images/profile_pics/default/03.jpeg"; break; } $query = mysqli_query($conn, "INSERT INTO users VALUES (NULL, '$fname', '$lname', '$username', '$email', '$pwd', '$date', '$profile_pic', '0', '0', 'no', ',')"); array_push($error_array, "<span style='color: #14C800;'>You're all set! Go ahead and login!</span><br>"); //clear session variables $_SESSION['fname'] = ""; $_SESSION['lname'] = ""; $_SESSION['email'] = ""; $_SESSION['email2'] = ""; } } //polish user imput function clean($data) { $data = str_replace(" ","", $data); $data = htmlspecialchars($data); $data = stripslashes($data); $data = strip_tags($data); $data = trim($data); return $data; } ?> I can't get the reg. form handler to recognize the $conn variable from the config.php file. if I add require '../../config/config.php'; to it I get this error:
Warning: require(../../config/config.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/qcicnews/includes/form_handlers/register.php on line 3 I don't know why it can't find that file, but the way I understand PHP is that I don't need that line because it's in the register.php. When I don't use it I get a party of errors all connected to it not recognizing the $conn variable:
Notice: Undefined variable: conn in /opt/lampp/htdocs/qcicnews/includes/form_handlers/register.php on line 43
There's about 6 more that look like the ones above but from different lines where $conn is referenced, I just deleted them for brevity sake. I'm pretty new to PHP and this is the most difficult situation I've encountered so far, can someone help me find the way here?
Here's a very interesting conundrum that I think will stump quite a few of you. Here's the setup: I was put in charge of the project of maintaining and developing a database application for one of my company's customers. The application has been evolving ever since. One of the more recent changes we've been working on is to add file upload functionality to catalog forms, letters, etc. I had this application working before by uploading the file directly to the server, giving it a random name, putting it in a /forms directory, and entering a hyperlink in a log line, which was then entered into the MySQL database. It's a pretty straightforward procedure. BUT my customer doesn't always have net access so he has a laptop running the application with its own MySQL and PHP installation, and he has a script that synchronizes the database with the one on our server. Not very practical or efficient, I know, but I inherited this project and had no choice in the matter. Since the client needs to upload and catalog files, and needs those files to be in sync with our server, I figured instead of just having a folder full of files that also has to be synched, why not throw binary data into the database and have the files in the database? Well I quickly developed a set of scripts to handle this task, and all of them worked flawlessly on our Linux server. It worked, that is, until I tried to install the same code on our client's Windows crapbox. At this point, I'd like to convey the download script that I wrote: Code: [Select] require_once('includes/application.inc.php'); if($_REQUEST['id']) { $id = mysql_real_escape_string($_REQUEST['id']); } else die("Error"); $result = mysql_fetch_assoc(mysql_query("SELECT * FROM Files WHERE id = $id")); header("Content-type: ".$result['type']); header("Content-length: ".$result['size']); header("Content-Disposition: attachment; filename=".$result['filename']); echo $result['data']; You see? Very simple and to the point. This script is called from a hyperlink elsewhere in the application, it queries for the file and downloads it. The problem is that when I'm running this download script on the laptop's Windows server, the browser echoes a \r\n as well as the binary data. As you can imagine, this wreaks havoc with files downloaded. Here's what I've determined: The data IS being stored properly in the database This only happens with certain files and not with others. The most egregious offenders are .odt files. The data is not being returned from the database corrupted. I verified this using various regex's and by dumping the data right out of the database into hex in the browser. Apache is not inserting that line break as seen by testing with static html files From these things, I have determined that PHP is the most likely culprit. My limited knowledge of the entire library of functions notwithstanding, is there anything I'm missing? Is there a more "safe" way to echo binary data? Does anyone have any sort of clue as to what could be causing this? I've scoured Google and this forum and haven't found anything. Thanks in advance for your insight. I've made a custom error handler, but it doesn't seem to work the same way on the dev and prod environments. Dev is windows/xampp, and prod is a standard LAMP install. Sometimes on prod I get a blank white screen and dev shows no errors. If I remove the error handler, everything goes back to normal. Just wondering if anyone sees something wrong he Code: [Select] <?php function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) { // email address to email errors to on the production environment $email_address = 'myemailaddress@gmail.com'; switch ($e_number) { case E_USER_ERROR: $error_type = 'E_USER_ERROR'; break; case E_USER_WARNING: $error_type = 'E_USER_WARNING'; break; case E_USER_NOTICE: $error_type = 'E_USER_NOTICE'; break; case E_WARNING: $error_type = 'E_WARNING'; break; case E_NOTICE: $error_type = 'E_NOTICE'; break; case E_STRICT: $error_type = 'E_STRICT'; break; default: $error_type = 'UNKNOWN ERROR TYPE'; break; } $message = '<hr />PHP ' . $error_type . ' #' . $e_number . ' - Date/Time: ' . date('n/j/Y H:i:s') . "\n" . '<br />File: <b>' . $e_file . "</b>\n" . '<br />Line: <b>' . $e_line . "</b>\n" . '<br /><b>' . $e_message . '</b><hr />'; // Output for development environment if (stristr($_SERVER['HTTP_HOST'], 'localhost' )) { echo $message; } // Email for production environment else { error_log($message, 1, $email_address ); if ( $e_number != E_NOTICE && $e_number < E_STRICT) { die('A system error occurred. We apologize for the inconvenience.'); } } // Don't execute PHP internal error handler return true; } function my_error_handling() { set_error_handler('my_error_handler', E_ALL); } Is it possible to find out what line of code a PHP script was processing immediately before it is interrupted upon receiving a POSIX signal? A bit of background - I've got a PHP script which runs (from the command line) hundreds of thousands of times a day and usually it's just fine. Every so often (less than once a week) it gets into a muddle and freezes until I kill it. I've written a signal handler (using the posix_signal() function) into the script which catches SIGABRT signals. When it gets one, it dumps $GLOBALS to a file, cleanly releases the data its working on then exits. That gives me a nice 'get out of jail free' card, but I'd really like to identify where (and then why) it's freezing. I could insert loads of debugging code which sets some variable with what stage it's up to, but it's a fairly complicated script and I'd rather not. There's got to be a better way! __LINE__ and __FUNCTION__ unfortunately just point to my signal handler function. So, is there anyway that the function which is invoked by the SIGABRT signal can report what line of code the script was on at the time the SIGABRT was received? Or alternatively, is there a way to figure out what a running PHP script is doing if you know its PID? Maybe there's something in /proc/<PID> which might help me... I'm sure it's not much, but I'm not understanding something with custom error handlers: I've created a custom error handler, which I initially set when my page loads : set_error_handler(array ( new ErrorHandler(), 'handleError' ));
It seems to catch all internal PHP errors, such as if I: var_dump($non_existing_var); right after the set_error_handler.... Now, I have an object that throws an exception after: set_error_handler(array ( new ErrorHandler(), 'handleError' )); $locale = new \CorbeauPerdu\i18n\Locale(...); // this should throw an exception ... I thought that with an error handler set, I could 'skip' the try/catch for it, but doing so, PHP spits out in its internal log: PHP Fatal error: Uncaught CorbeauPerdu\i18n\LocaleException: ....
My error handler doesn't catch it at all before, thus my page breaks!! If I want it to go through the error handler, I have to init my Locale with a try/catch and use trigger_error() like so: set_error_handler(array ( new ErrorHandler(), 'handleError' )); try { $locale = new \CorbeauPerdu\i18n\Locale(...); // this should throw an exception } catch(Exception $e) { trigger_error($e->getMessage(), E_USER_ERROR); } ... Is this normal ? I thought one of the goals of the error_handler was to catch anything that wasn't dealt with? Thanks for your answers! This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=358486.0 Hello dear friends, I've simple question if i've file called file.php and i want to make button (not href link) just button as <input> when i click on it, it will run file.php just like (href) thanks <?php $counter_name = 'Counter.txt'; if (!file_exists($counter_name)) { $f = fopen($counter_name, "w"); fwrite($f,"0"); fclose($f); } $f = fopen($counter_name,"r"); $counterVal = fread($f, filesize($counter_name)); fclose($f); $counterVal++; $f = fopen($counter_name, "w"); fwrite($f, $counterVal); fclose($f); echo $counterVal; ?> This is click counter... Counter.txt only number... How to add a date? Counter / Date 1. 2021-02-28 19:50:47 2. 2021-02-23 17:57:11 etc
Hi, I have an image map mixed in with php, and it won't click when I click the mouse on it, it won't work. Any help greatly appreciated. Thanks. Derek here is the code where I use it. Code: [Select] if(isset($_GET['newLocation'])) { $_SESSION['current_location']=$_GET['newLocation']; } if(!isset($_SESSION['current_location']) && !isset($_SESSION['current_background']) && !isset($_SESSION['currentMonster'])) { $_SESSION['current_location'] = 0; $_SESSION['current_monster'] = 0; $_SESSION['current_background'] = 0; } if($_SESSION['current_location'] != 0) { if(!isset($_SESSION['current_background']) && !isset($_SESSION['current_monster'])) { $_SESSION['current_monster'] = 0; $_SESSION['current_background'] = 0; } if(isset($_GET['further'])) { //below is- inside the locations array, teardrop ocean (1) the background image is 4(example)+1 is set, then //do this if(isset($locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']+1])) { $_SESSION['current_background']+=1; } if(isset($locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']+1])) { $_SESSION['current_monster']+=1; } } elseif(isset($_GET['back'])) { if(isset($locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']-1])) { $_SESSION['current_background']-=1; } if(isset($locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']-1])) { $_SESSION['current_monster']-=1; } } // I dont have any $_SESSION['background'] var //$currentBackground=$_SESSION['background'][$_SESSION['current_background']]; $currentBackground = $locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']]; //I dont have any $_SESSION['monster'] var //$currentMonster=$_SESSION['monster'][$_SESSION['current_monster']]; $currentMonster=$locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']]; } else { //?newLocation=1 means set it to Teardrop ocean. $currentBackground = ' <img src="aradia.jpg" width="256" height="328" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="rect" coords="5,176,81,249" href="?newLocation=1"/> </map>'; $currentMonster = ''; } Ok, I'm not sure if this is even possible but I will try and explain what I want to do and then maybe someone will be able to point me in the right direction. Say I have a link to an external site like google for example, when that link is clicked the target (google in this case) will open in a new window and the page on my site remains the same, is it possible to insert data into a table in my database at the same time when the link was clicked like an id value for the link, effectively creating a count, which can be displayed somewhere on the page? I really hope that makes sense, any help would be much appreciated! Hi all, I'm just wondering what the best solution to my current problem would be. Ive created a website where users can upload photos to a database, the photos are then shown in the admin section as a list. My DB structure is as such.. PHOTO SRC THEME 1.jpg images/1.jpg 1 2.jpg images/2.jpg 0 3.jpg images/3.jpg 0 4.jpg images/4.jpg 1 This is then reflected in the admin page, I need a button which will alter all photo's with the theme '1' and change them to '0', like a reconcile button, is this possible? How would you go about it? Thanks everyone |