PHP - My Image Map Won't Click
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 = ''; } Similar TutorialsI am trying to have an UPDATE query run when I click an image on a web page. I just need to have the image call the function to run the mysql from the corresponding php file. The image is a form object, which I need the php function to recognize when it is clicked, and then run the query(ies) within. I don't really know much php, so the php code is based on a snippet I have from one of my other sites, which works fine over there, but I am missing something here that is keeping it from doing the same here. The page already loads and displays all values in a list associated with $show_id, so that variable is already being pulled from the web page in to the php code. I'm not going to paste the entire books.php file here as there are too many things it does which doesnt have anything to do with this little add-on I am making. I just need to be able to pull that variable in to the query below and have it run when I click on the icon associated with it. The php file also already has the proper config and settings files linked to it that connect to the database, so I do not need to set that up here. It is just a form, calling a function, and running the query. It is also not visible to the user side. It is in an admin page, only visible and accessible to me. This is code I have in the php file: function UpdateAllShowBooks() { if(strlen(($_POST['retired'])) > 0){ $sql = "UPDATE ttb_books SET status_id = '2' WHERE show_id='$show_id'"; $db = new database(); $db->myquery($sql, 1); header('Location:books.php?show_id=$show_id'); die(); } if(strlen(($_POST['upcoming'])) > 0){ $sql = "UPDATE ttb_books SET status_id = '37' WHERE show_id='$show_id'"; $db = new database(); $db->myquery($sql, 1); header('Location:books.php?show_id=$show_id'); die(); } if(strlen(($_POST['current'])) > 0){ $sql = "UPDATE ttb_books SET status_id = '1' WHERE show_id='$show_id'"; $db = new database(); $db->myquery($sql, 1); header('Location:books.php?show_id=$show_id'); die(); } } This is the current image/form html: <center><table width=25%> <tr><td valign="top" align="center"> <!--<form method="post" action="books.php?show_id={show_id}">--> <form method="post" action="books.php" name="retired"> <input type="image" src="../images/icon-Red_Light.png" width="20" name="retired" alt="Set status to Out of Print" title="Set status to Out of Print" onclick="return confirm('Set ALL status to Out of Print?')"> <input name="shid1" type="hidden" id="shid1" value="{show_id}" /> </form> </td><td valign="top" align="center"> <form method="post" action="books.php" name="upcoming"> <input type="image" src="../images/icon-Yellow_Light.png" width="20" name="upcoming" alt="Set status to Upcoming Release" title="Set status to Upcoming Release" onclick="return confirm('Set ALL status to Upcoming Release?')"> <input name="shid2" type="hidden" id="shid2" value="{show_id}" /> </form> </td><td valign="top" align="center"> <form method="post" action="books.php" name="current"> <input type="image" src="../images/icon-Green_Light.png" width="20" name="current" alt="Set status to In Print" title="Set status to In Print" onclick="return confirm('Set ALL status to In Print?')"> <input name="shid3" type="hidden" id="shid3" value="{show_id}" /> </form> </td></tr> </table></center> So clicking on the form image would call the function with that mysql string and update all items in the list accordingly. At this time, when I click the image, it reloads the page fine, but it is not activating the sql in the function and making the Update occur. Thank you for any help you can provide. I really appreciate it. Hi, I need to run a database insert when somebody clicks on an image. Should I use a php function ? or javascript ? or something else ? Many thanks in advance, Scott. Hey guys, I want to pass the unique id of a node to a function when that image is clicked. Actually i am a newbee in php so don't know what to search about or where to look for it,but find this place and you all guys so helpful so i am asking for a guide here Hi, I currently have this code which displays text on clicking the image: <a href="javascript:;" onclick="document.getElementById('text').style.display='block';window.open('url...');"><img src="image..."></a> <div id="text" style="display:none;"> ...text to be displayed here </div> it works fine but I want to integrate this with php which is where I am struggling. I have a mySQL database with 4 fields (id;name;description;url), what i would like to do is name the div to be opened on click with the 'id' field from the database so that it would become '<div id="id"> and then more than one function could be implemented on each page. I would also like to replace '...text to be displayed here' with the field 'name' from the database and '...url' with the field 'url from the database. Any help would be very much appreciated. Thanks in advance. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347058.0 I am working on a simple gallery. I want to have an option to download full scale image without users having to right click and "save as". Using this code you get a image preview: <a href="pictures/img-(1).jpg"><img src="thumbnails/img-(1).jpg"></a> How can I modify it so when user clicks on thumbnail of image 1 it will prompt him to save the image instead of viewing it. Thanks 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>"; 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 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! <?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
How can I set a variable when <a href="#">Link</a> is clicked? for example to set $variableX as integer of 1? When i press login i get Fatal error: Call to a member function query() on a non-object in /home/a5347792/public_html/login.php on line 15
<?php $dbConnection['username'] = "root"; $dbConnection['password'] = ""; $dbConnection['host'] = "localhost"; $dbConnection['db'] = "joke"; if(isset($_POST['rbLgn'])) { $login = true; if(isset($_POST['username'])) { $username = $_POST['username']; } if(isset($_POST['password'])) { $password = $_POST['password']; } if(isset($username) && isset($password)) { $query = $db->query("SELECT * FROM `users` WHERE `username`='{$username}' AND `password`='{$password}' LIMIT 1"); if($query->num_rows > 0) { echo "User found - logging in."; } else { echo "User not found, credentials: " . $username . " | " . $password; } } } ?> Edited by mac_gyver, 25 October 2014 - 10:21 AM. code tags when posting code please Hei everyone. When any one clicks on any ad network banner that i place on site after a click on banner i want it to hide / remove. I need this so wont have multiple ad clicks and prevent being banned I dont need a function on a simple click anywhere on page. I need when banner clicked to get hidden after the click is made on it. Edited October 17, 2015 by skendoHi, I am creating an admin page that allows me to view requests for sheet music that is not currently on my website. (View image to get an idea of what we're talking about). On this page are 6 columns. ID (autoincremented) This is the # the request is Userid - the user's id artist - the name of the artist the user requested title - the name of the title the user requested added - after I have manually added the sheet music to my site, i click added which will set the "added" column in my sql table to "yes". Also, once added is clicked, an email will be sent to the user that originally requested the sheet. delete - This deletes the row in the sql database, and removes it from view on my page. At the bottom of the page, there is also a button called "Added All", which goes through and sets the "added" status to "yes" for all rows on the page. So, the problem I'm having right now, is emailing the user after I have selected Added. After I figure this out, I need to implement it into the "Added All" button, which will email all the corresponding users. Here is what I have come up with. Any input appreciated. I'm not getting any errors at this point. I tested my variables and all are echoing out correctly. The area that I have specified to email the user is in this if statement: if ($confirm=="true" && isset($_GET['id'])) Here's my code. Thanks <?php session_start(); include_once('../inc/connect.php'); include_once('../inc/admin.php'); if (isset($_SESSION['username'])){ $loginstatus = "logout"; if(!isset($_SESSION['sort_counter'])) {$_SESSION['sort_counter'] = 1;} if(($_SESSION['sort_counter']%2) == 0){ //test even value $sortcount = "DESC"; }else{ //odd value $sortcount = ""; } $result = mysql_query("SELECT * FROM requests WHERE added='no' ORDER BY id"); $requestedquery = mysql_query("SELECT added FROM requests WHERE added='no'"); $requestedcount = mysql_num_rows($requestedquery); $addedquery = mysql_query("SELECT added FROM requests WHERE added='yes'"); $addedcount = mysql_num_rows($addedquery); $getuserinfo = mysql_query("SELECT * FROM users"); $row2 = mysql_fetch_assoc($getuserinfo); $sort = $_GET['sort']; $delete = $_GET['delete']; $confirm = $_GET['confirm']; ///////////////////////////////// if ($sort=='id'){ // $result = mysql_query("SELECT * FROM users ORDER BY id"); $result = mysql_query("SELECT * FROM requests WHERE added='no' ORDER BY id $sortcount"); $_SESSION['sort_counter'] = $_SESSION['sort_counter'] + 1; //increment after every run } if ($sort=='userid'){ // $result = mysql_query("SELECT * FROM users ORDER BY username"); $result = mysql_query("SELECT * FROM requests WHERE added='no' ORDER BY userid $sortcount"); $_SESSION['sort_counter'] = $_SESSION['sort_counter'] + 1; //increment after every run } if ($sort=='artist'){ // $result = mysql_query("SELECT * FROM users ORDER BY email"); $result = mysql_query("SELECT * FROM requests WHERE added='no' ORDER BY artist $sortcount"); $_SESSION['sort_counter'] = $_SESSION['sort_counter'] + 1; //increment after every run } if ($sort=='title'){ // $result = mysql_query("SELECT * FROM users ORDER BY email"); $result = mysql_query("SELECT * FROM requests WHERE added='no' ORDER BY title $sortcount"); $_SESSION['sort_counter'] = $_SESSION['sort_counter'] + 1; //increment after every run } if ($sort=='file'){ // $result = mysql_query("SELECT * FROM users ORDER BY email"); $result = mysql_query("SELECT * FROM requests WHERE added='no' ORDER BY file $sortcount"); $_SESSION['sort_counter'] = $_SESSION['sort_counter'] + 1; //increment after every run } /// FIX THIS AREA if ($confirm=="true" && isset($_GET['id'])) { mysql_query('UPDATE `requests` SET `added`="yes" WHERE id = ' . (int)$_GET['id']); $useremailquery = mysql_query("SELECT email FROM users WHERE id=".$row2['id'].""); $emailrow = mysql_fetch_assoc($useremailquery); $useremail = $emailrow['email']; $to = $useremail; $subject = "Sheet requested ready for download!"; $Email = "admin@mysite.com"; mail("$to", "$subject", " Hello, <br />The sheet that you requested on Sheet Music site is now ready for download.<br /> Thank you<br /><strong>Sheet Music site</strong>", "$Email"); echo "<SCRIPT language='JavaScript'><!-- window.location='requestedsheets.php';//--> </SCRIPT>"; } if ($delete=="true" && isset($_GET['id'])) { mysql_query('DELETE FROM `requests` WHERE id = ' . (int)$_GET['id']); echo "<SCRIPT language='JavaScript'><!-- window.location='requestedsheets.php';//--> </SCRIPT>"; } if ($delete=="false" && isset($_GET['id'])) { echo "<SCRIPT language='JavaScript'><!-- window.location='requestedsheets.php';//--> </SCRIPT>"; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="../styles/style.css" /> <link rel="stylesheet" type="text/css" href="../styles/requestedsheets.css" /> <script type="text/javascript"> function make_blank() { if(document.login.username.value =="Username"){ document.login.username.value =""; document.login.username.style.color ="#000000"; } } function make_blank1() { if(document.login.password.value =="Password"){ document.login.password.value =""; document.login.password.type ="password"; document.login.password.style.color ="#000000"; } } function undoBlank() { if(document.login.username.value == ""){ document.login.username.value ="Username"; document.login.username.style.color="#ccc"; } } function undoBlankpass() { if(document.login.password.value == ""){ document.login.password.value ="Username"; document.login.password.style.color="#cccccc"; } } </script> </head> <body bgcolor="#343331"> <!-- Header --> <div id="header"> <div id="headerleft"></div> <div id="headermiddle"><a href="../index.php"><img src="../img/logo.png"></a></div> <div id="headerright"> <?php echo "<form name='login' action='../inc/$loginstatus.php' method='POST'>";?> <div class="loginboxdiv" id="username"> <input type="text" class="loginbox" name="username" value="Username" onFocus="make_blank();" onBlur="undoBlank();"> </div> <div class="loginboxdiv" id="password"> <input class="loginbox" type="text" name="password" type="text" value="Password" onFocus="make_blank1();" onBlur="undoBlankpass();"> </div> <div id="login"> <?php echo "<input type='image' src='../img/$loginstatus.png' alt='".ucfirst($loginstatus)."'>";?> </div> </form> <div id="register"> <a href="../register.php"><img src="../img/register.png"></a> </div> <div id="forgotpassword"> <a href="../resetpassword.php" class="forgot">Forgot Password?</a> </div> </div> </div> <!-- Content Top --> <div id="contenttop"> <div id="links"> <table cols="7"> <tr> <td align="center" valign="middle" width="100px" height="48px"><a href="../index.php"><img src="../img/home.png"></a></td> <td align="center" valign="middle" width="100px" height="48px"><a href="../member.php"><img src="../img/member.png"></a></td> <td align="center" valign="middle" width="100px" height="48px"><a href="../addsheet.php"><img src="../img/addsheet.png"></a></td> <td align="center" valign="middle" width="100px" height="48px"><a href="../advertise.php"><img src="../img/advertise1.png"></a></td> <td align="center" valign="middle" width="100px" height="48px"><a href="../faq.php"><img src="../img/faq.png"></a></td> <td align="center" valign="middle" width="100px" height="48px"><a href="../terms.php"><img src="../img/terms.png"></a></td> <td align="center" valign="middle" width="100px" height="48px"><a href="../contact.php"><img src="../img/contact.png"></a></td> </tr> </table> <!-- 92x30 --> </div> </div> <!-- Content Middle --> <div id="contentmiddle"> <div id="content"> <?php include('inc/navadmin.php'); echo "<br /><div style='font-size: 28px; text-align: center;'>Requested Sheets</div> <div id='headcont'> <div id='requested'>Requested Sheets: ".$requestedcount."</div> <div id='added'>Added Sheets: ".$addedcount."</div> </div><br /> <table border='1' align='center'> <tr> <th bgcolor='#cccccc'><a href='requestedsheets.php?sort=id'>ID</a></th> <th bgcolor='#cccccc'><a href='requestedsheets.php?sort=userid'>UserID</a></th> <th bgcolor='#cccccc'><a href='requestedsheets.php?sort=artist'>Artist</a></th> <th bgcolor='#cccccc'><a href='requestedsheets.php?sort=title'>Title</a></th> <th bgcolor='#cccccc'><a href='requestedsheets.php'>Added</a></th> <th bgcolor='#cccccc'><a href='requestedsheets.php'>Delete</a></th> </tr>"; echo "<script type='text/javascript'> function show_delete() { var r=confirm('Delete?'); if (r==true) { // Delete return true; } else { // Don't Delete return false; } } "; echo " function show_undelete() { var r=confirm('Undelete?'); if (r==true) { // Undelete return true; } else { // Don't Undelete return false; } } </script>"; $usersids = ""; $i = 0; while($row = mysql_fetch_array($result)) { // $active = $row['active']; $color = "#ffffff"; $deleted = "Delete"; if ($active=='no'){ $color = "#f43636"; $deleted = "Undelete"; $active = "false"; $alert = "show_undelete"; } else{ $active = "true"; $alert = "show_delete"; } // echo "<tr>"; echo "<td align='center' width='40' bgcolor='$color'>" .$row['id']. "</td>"; echo "<td align='center' width='40'>" .$row['userid']. "</td>"; echo "<td align='center' width='230'>".ucwords($row['artist'])."</td>"; echo "<td align='center' width='230'>".ucwords($row['title'])."</td>"; echo "<td align='center' width='10'><a href='requestedsheets.php?confirm=true&id=" .$row['id'] . "'>Added</a></td>"; echo "<td align='center' width='10'><a href='requestedsheets.php?delete=$active&id=" .$row['id']. "' onclick='return $alert()'>$deleted</a></td>"; echo "</tr>"; $usersids[$i] = $row['id']; $i++; } echo " <tr> <td align='center' width='10' colspan='6'><a href='requestedsheets.php?confirm=all'>Added All</a></td> </tr>"; if ($confirm=="all") { $i = 0; mysql_data_seek($result,0); while($row = mysql_fetch_array($result)) { mysql_query('UPDATE `requests` SET `added`="yes" WHERE id = ' . $usersids[$i]); $i++; } echo "<SCRIPT language='JavaScript'><!-- window.location='requestedsheets.php';//--> </SCRIPT>"; } echo "</table>"; } else{ $loginstatus = "login"; } ?> </div> </div> <!-- Content Bottom --> <div id="contentbottom"> </div> </body> </html> Hello there, I was wondering what coding would be required to block users from clicking/viewing content. My idea was only to allow people to request songs every 2 minutes. would I use PHP for this in terms of the request form template which is: <?php $song = file_get_contents('http://site.com/song.php'); if(!empty($song)) { header('Location: song-requests-interface.php'); } else { header('Location: offline.html'); } ?> Or would I use JS. The trouble is, I'm unsure if JS would be able to remember the users details. They could easily refresh the page. Many thanks hello, would anyone could point me in the right direction. ?? i have 2 language buttons along the top on my web site. Code: [Select] <div class="flags"> <ul> <li><a href="#"><img src="templates/template1/images/flags/France.png" alt="France"/></a></li> <li><a href="#" class="current"><img src="templates/template1/images/flags/United Kingdom(Great Britain).png" alt="United kingdom" /></a></li> </ul> </div><!-- #flats --> how do i make it so that if i click on one it will change the sites language. ??? i have it all set up in the db so that there is a default language and if i change the default language the language changes but what code do i need to use to make my buttons changes the language? could anyone point me to some jscript or ajax or something please... many thanks rick I have buttons for clocking in and clocking out at my school. When pressed they will get into DB and record current date and time. how to achieve the on click event in php?
<?php include('dbcon.php'); include('session.php'); $result=mysqli_query($con, "select * from staff where OracleID='$session_id'")or die('Error In Session'); $row=mysqli_fetch_array($result); echo("\n"); ?> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="form-wrapper"> <center> <h3>Welcome: <?php echo $row['StaffName']; ?> </h3> <?php if ($row['ClockedIn'] == True and $row['ClockedOut'] == False) {echo "You already clockedIn today, please clockOut"; echo '<button hidden> type="button" class="buttonstyle" >Clock Time IN!</button>'; echo '<button type="button" class="buttonstyle">Clock Time OUT!</button>';} ?> <?php if ($row['ClockedOut'] == False and $row['ClockedIn'] == False) {echo '<button type="button" class="buttonstyle" >Clock Time IN!</button>'; echo '<button type="button" class="buttonstyle" >Clock Time OUT!</button>';} ?> <?php if ($row['ClockedIn'] == True and $row['ClockedOut'] == True) {echo "You already clockedIn and ClockedOut today!"; echo '<button hidden> type="button" class="buttonstyle" >Clock Time IN!</button>'; echo '<button hidden> type="button" class="buttonstyle">Clock Time OUT!</button>';} ?> </center> </div> </body> </html>
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 Hello friends,
I am trying to achieve a simple thing, but I do not know jquery/javascript much. When I click on a forst list item in one div , I want to show corresponding 1st li in the second div. I have 6 list items in total and related 6 li in second div.
Also when I click on any list item in first div, it will be borderd, this I achieved. But I am not able to bring the related li in the second div.
Hope I make myself clear.
Here is my code
<style> .selected img { border:2px solid #090; } .visible { display:block; } .invisible { display:none; } </style> <div id="all"> <ul> <li class="selected"><img src="image1.JPG" /></li> <li><img src="image2.JPG" /><br /></li> <li><img src="image3.JPG" /><br /></li> </ul> </div> <div class="container"> <ul> <li class="visible"><img src="related_image1.JPG" /></li> (In these list items there may be img or content) <li class="invisible"><img src="related_image2.JPG" /></li> <li class="invisible"><img src="related_image3.JPG" /></li> </ul> </div> <script type="text/javascript"> $('#all ul li').on('click', function(){ $(this).addClass('selected').siblings().removeClass('selected'); $('.container ul li:nth-child(1)').fadeout(); // Don't know this line is correct or not }); </script>Any help guys ? Edited by Jaswinder, 19 July 2014 - 08:57 PM. Hi all
The below validation code works fine when the form gets submit.
But i want to apply validation "onclick" of button instead of "onsubmit"
How can i apply validation "onclick" of button instead of "onsubmit"
<html> <head> <script language="javascript"> function checkForm(frm){ var destCount = frm.elements['dest[]'].length; var destSel = false; for(i = 0; i < destCount; i++){ if(frm.elements['dest[]'][i].checked){ destSel = true; break; } } if(!destSel){ alert('Select one or more destinations'); } return destSel; } </script> </head> <body> Select at least one destination <form action="" method="post" onSubmit="return checkForm(this);"> <input id="cx" type="checkbox" name="dest[]" value="CX" /> <label for="cx">Cox's Bazar</label><br /> <input id="su" type="checkbox" name="dest[]" value="SU" /> <label for="su">Sundarban</label><br /> <input id="sy" type="checkbox" name="dest[]" value="SY" /> <label for="sy">Sylhet</label><br /> <input id="ch" type="checkbox" name="dest[]" value="CH" /> <label for="ch">Chittagong</label><br /> <br /> <input type="submit" name="Go" value=" Go " /> </form> </body> </html>Thanks Vineet |