Jump to content

houssam_ballout

Members
  • Content Count

    199
  • Joined

  • Last visited

Posts posted by houssam_ballout

  1. Hello all,I don't know if this is the correct to place this question, but I'd 2 rows with menu in the upper row, when the user put mouse over on the any item in the menu, he should get a sub menu in the next rowAny help?Thanks a lot

  2. Hello all,The code below is for selecting the search criteria, the question that I'd:near each select box there is a search click, so that the user can click on it and search for the things that he/she want, I want to know what did the user chose from the select box when he click the search?thanks

    <!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><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><table border="1"><form name="search" method="post"><?phpinclude('conn.php');$username = $_GET['username'];//Select all Majors$sql1 = "select * from majors";$result1 = mysql_query($sql1) or die(mysql_error());echo "<tr>";echo "<td>Major Name</td>";echo "<td><select name='major'>";while($row1 = mysql_fetch_array($result1)){ echo "<option>". $row1['name'] ."</option>";}$text = $_POST['major'];echo $text;echo "</select></td><td><a href='search.php?search=major&text=\'$text\''>search</a></td></tr>";//Select all Universities$sql2 = "select * from lebaneseuniversities";$result2 = mysql_query($sql2) or die(mysql_error());echo "<tr>";echo "<td>Universtiy Name</td>";echo "<td><select name='university'>";while($row2 = mysql_fetch_array($result2)) echo "<option>". $row2['smallname'] ."</option>";echo "</select></td><td><a href='search.php?search=university'>search</a></td></tr>";//Locationecho "<tr>";echo "<td>Location</td>";echo "<td><select name='branch'>";echo "<option>Fidar-Halat</option>";echo "<option>Beirut</option>";echo "<option>Saida</option>";echo "<option>Ashrafieh</option>";echo "<option>Koura</option>";echo "<option>Hariss</option></td>";echo "</select>";echo "</td><td><a href='search.php?search=location'>search</a></td></tr>";//Tuition Limits$sql3 = "select distinct Tuition from lebaneseuniversities";$result3 = mysql_query($sql3) or die(mysql_error());echo "<tr>";echo "<td>Tuition Range</td>";echo "<td><select name='tuition'>";while($row3 = mysql_fetch_array($result3)) echo "<option>". $row3['Tuition'] ."</option>";echo "</select></td><td><a href='search.php?search=Tuition'>search</a></td></tr>";?></form></table></body></html>
  3. I'd used this javascript and it works:<script><!--function doBlink() { var blink = document.all.tags("BLINK") for (var i=0; i<blink.length; i++) blink.style.visibility = blink.style.visibility == "" ? "hidden" : "" }function startBlink() { if (document.all) setInterval("doBlink()",1000)}window.onload = startBlink;// --></SCRIPT>

  4. hello all,I am trying this sql:select count(OptionNb),comments from tblanswer where idQuestion = $idQuestion And OptionNb = 'option$i' and I got this errorMixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clauseHow could I solve it ?Thanks in advance

  5. hello all,I am building a questionnaire, so each question has different options (checkbox, radio button and comments which is text box).I'd multi radio buttons that are created dynamically and text boxes and radio buttons (which are working great except the radio buttons), because I should gave them same name.I think of way, by giving the radio buttons the name which is $idQuestion , in order for the user to be able to select one radio button for each question, but how can use that array when the form is sent back?Thanks in advance

  6. Hello all,I'd multiple checkboxs and radio buttons , and they are generated automatically based on the database that I'd (mysql)..on my page, I had queried all the questions and number of options, part of the code that I think you need is:for($i=1;$i<=$NbOptions;$i++){if($MultiAnswer == 'yes'){echo "<input type='checkbox' name='box[]' value='$idQuestion_$i' />" . $row2['option'.$i];echo "<br />";}else{echo "<input type='radio' name='box[]' value='' />" . $row2['option'.$i];echo "<br />";}}when I press save ,I useif(isset($_POST['save']))//here I want to loop through all the box[]?and see if its checked or no

  7. Hello all,I don't know if this is the right place to ask such question.I'd done a form in HTML with drop down box (composed of numbers) which when selected it display the number of text boxes accordingly. I am facing a problem which is: when the form is finally submitted it takes the default number in the drop down box which is 1.I need a help so that I don't want the page to be refreshed when I select the number from the drop down box?Thanks for your help

  8. Hello all,on the html page I'd make link so that when the user clicks on it, it will delete the data with that associated ID,<a href="question_edit.php?action=delete">Delete </a>How could I retrieve the fact that I'd click on that link?for example, like in : ifisset(action......)Thanks in advance

  9. Helo all,I am building an applications using php, I'd created a page where the user can add questions. I gave him the option to add different answers by selecting the number of options from a drop-down box.The code below is running but I'd to click the button to add my number of boxes, I want to make in a way , that when I select the number of boxes from the drop-down to create it automatically (in other way, call the form submit automatically)?Thanks in advance<!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><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><?phpif(isset($_POST['select'])){$number = $_POST['NbOptions'];for($i=0;$i<$number;$i++)echo "<input type='text' name='option$i' /><br />";}?><form name="test" method="post"><select name="NbOptions"><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option></select><input type="submit" name="select" /></form></body></html>

  10. You want the timer <div> to "follow" the mouse? Physically? Like, the mouse moves across the screen, and the timer moves with it? Or do you want the timer to start counting when the mouse enters the page? These would lead to very different answers.
    well,I want the timer that is already on the page to follow the mouse
  11. Hello all,I'd a code, its about timer, it works fine, I just want to make it follow the mouse when I enter the page?Any helpThanks in advanceThe code is:

    <html><head><link rel="stylesheet" type="text/css" href="ex1.css"/><style type="text/css">div { background-color: #ccffff; size: 50pt }</style><script type="text/javascript">var second=0;var min=1;var hour=1;function start(){   window.setInterval("updatesec()",1000);}function updatesec(){	   second++;		 if(second == 60 )		 {			second= -1;			updatemin();		 }	   seconds.innerText=second;}function updatemin(){	  min++;   if(min >= 59)   {	  if(min== 59)		{		 minutes.innerText=min;		 updatesec();		}	   else		{		  updatehour();		}   }   minutes.innerText=min;   updatesec();}function updatehour(){   hour++;   hours.innerText=hour;   if(hour == 12 && min == 60 && second == -1)   {	  hour=1;	  min=-1;	  sec=-1;	  updatesec();   }	  updatesec();}</script></head><body  onload="start()"><div  style=" width: 100pt;height: 40pt"><h1><strong id="hours">1</strong>:<strong id="minutes">1</strong>:<strong id="seconds">0</strong></h1></div></body></html>

×
×
  • Create New...