Jump to content

sunfighter

Members
  • Posts

    579
  • Joined

  • Last visited

    Never

Everything posted by sunfighter

  1. The php you gave us outputs this: Match Date: The Date Here venue_name venue_address (The Number of Tickets Left) tickets left to buy for this match --------------------------------------------------------------------------------------------- For every venue. Is it the bottom line you want removed ? Then what do you want to remain?
  2. This line: <input ondblclick=\"exchange(this);\" id=\"itm1b\" class=\"replace\" type=\"text\ name=\"title\">"; is missing a " <input ondblclick=\"exchange(this);\" id=\"itm1b\" class=\"replace\" type=\"text\" name=\"title\">"; And this line: <input type="hidden" name="id" value="<?php $row['id'] ?>" is missing the word echo and the terminator. <input type="hidden" name="id" value="<?php echo $row['id']; ?>"
  3. In order to see if your javascript is sending an ajax call, I always start with the php file it's calling set to this: <?php echo 'made it'; ?> When I get the return message I then place the correct info into the file. I just checked your main file. It does not call the php Made It file! Problem is in the queryString var queryString = "?postcode=" + postcode + "&provincie=" + provincie + "&aland=" + aland + "&gland=" +gland +"&minAge=" + minAge +"&maxAge=" + maxAge + "&sex=" + sex; You were using the wrong identifiers. If the call still does not work for you change this line: xmlhttp.send(); To: xmlhttp.send(''); I have never got the thing to work with an empty nor the word 'null' in the parentheses. Try that and after you get 'made it' in the "txtHint" div THEN use your php file.
  4. simple substitution: <script type="text/javascript"> function showLayer(name) { name.style.display = "block"; } function hideLayer(name) { name.style.display = "none"; } </script> Example click <span onclick="showLayer(thisone)" style="cursor:hand"><b>here</b></span><br> <div id="thisone" style="position: top:100; left:10; absolute;display:none;"> Some text or other stuff <br> <a href="#null" style="cursor:hand" style="text-decoration:none;" onclick="hideLayer(thisone)">[ hide ] </a> </div> <p> Example click <span onclick="showLayer(sone)" style="cursor:hand"><b>here</b></span><br> <div id="sone" style="position: absolute; display:none;">Some text or other stuff <br><a href="#null" style="cursor:hand" style="text-decoration:none;" onclick="hideLayer(sone)">[ hide ]</a> </div> <p>
  5. When use use the visibility style element you take up the space that the div would have even if it is hidden. Use display="none"; This gives up that space, but grabs it and pushes other elements down when it is revealed with display: block;
  6. See if this helps Matt: <form method="post" action="editindex.php"> <?php //$row["title"] = "TheTitle"; //$row["id"] = "TheId"; $sql = "SELECT * FROM home ORDER BY id ASC"; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo " <span id=\"itm1\" onclick=\"exchange(this);\">".$row['title']."</span> <input ondblclick=\"exchange(this);\" id=\"itm1b\" class=\"replace\" type=\"text\" name=\"title\" > <input ondblclick=\"exchange(this);\" id=\"itm1b\" class=\"replace\" type=\"text\" name=\"title\"> <input type=\"submit\" value=\"Save\" name=\"submit\"> <input type=\"hidden\" name=\"id\" value=".$row['id']."> "; } ?> </form> <?php if (isset ($_POST['submit'])) { $update = "UPDATE home SET title = '".$_POST['title']."' WHERE id = '" .$_POST['id']."'"; mysql_query($update); } ?>
  7. Please use the # tags above to show your code. Only have two dumb people here that will download and open strange file on their computer.
  8. Without rounding up, using string functions: <?php $number = 123.512645124; $part = explode('.', $number); $part[1] = substr($part[1], 0, 3); $number = implode('.', $part); echo $number; ?>
  9. Have you tried addslashes ( $str ) and stripslashes ( $str )?
  10. The man just filled out your form. He's looking at the information. He knows what that information is. Why do you have to show it to him again? The main thing here is sanitizing the input before you put it into your database. Things to read http://php.net/manual/en/security.database.sql-injection.php http://www.readwriteweb.com/hack/2010/09/php-security-sanitizing-string.php http://net.tutsplus.com/tutorials/php/sanitize-and-validate-data-with-php-filters/ Hope these help you. PS you can still repost the form info to him if you want, the way you said, select from the db.
  11. <form name='x'> <input type="radio" name="type" value='1' /> Renovation <br> <input type="radio" name="type" value='2' /> Buy and hold (Rental)<br> <input type="radio" name="type" value='3' /> Development <br> <br /> <input type='button' onclick="check();" value="click"> </form> <div id="di"></div> <script type="text/javascript"> function check() { doubleck = 0; var radio = document.getElementsByName('type'); for (var i = 0; i < radio.length; i++) { if (radio[i].checked) { alert(radio[i].value); doubleck = 1; } } if(doubleck == 0){ alert('Nothing has been checked'); } } </script>
  12. The for loop was just something to do. Replace it with you program
  13. Used a file like you said: <?php $handle = fopen('time.txt', 'r'); $old_time = fread($handle, 10); fclose($handle); $now_time = time(); $final_time = ($now_time - $old_time); if($final_time > 30) // The program you want to run goes here { for($i = 0; $i < 50000; $i++) { $bug = 'lets put some things in it'; $bug1 = 'lets put two things in it'; $bug2 = 'lets put three things in it'; $bug3 = 'lets put more things in it'; } echo $bug.'<br />'; echo $bug1.'<br />'; echo $bug2.'<br />'; echo $bug3.'<br />'; }else{ echo 'You must wait';die; } $time_end = time(); $handle = fopen('time.txt', 'w'); fwrite($handle, $time_end, 10); fclose($handle); ?>
  14. <?php $number = 3; for($i = 0; $i < 50; $i++) { $number = 2 * $number; echo $number . '<br />'; } ?>
  15. IE 7 ~8 has a bug with png images. Maybe change the image to jpg and see what happens.
  16. Where to start KDM? Your using the placeholder attribute which is part of HTML5, but your doctype is 4.01 Transitional. You use /> to close tags and that is not allowed in 4.01 Transitional. You have <td width="100"> in your footer table and width has been a style component for some time. You should have a wrapper div that encompasses everything, including the main and footer divs, you don't and that's part of the problem. Your main div is called "wrapper" and you give it min-height:100%; and your footer has height:220px; That is probably the big error. Suggest you study a doctype and use it, stay with px or %, try not to interchange them.
  17. Oh Yeah! I see the problem. It's right there. We need an icon for "show me some code"
  18. Don't program in IE. It does not live up to standards. Program in CHROME or FF, validate your code often here http://validator.w3.org/ and check it in IE. The pain in the butt comes from getting IE to work like the rest of the world.
  19. From reading I deduce that you have a form; in that form you show and potion your elements by using a table; one table cell has a dropdown labeled 'enter number of children' or some thing like that and when the number is chosen you want to expand this cell to have a number of additions to the form. I would like to see the code for the form and the css for it also. Needed to figure out how to expand the cell. But you are going to add something like this per child : <fieldset> <legend>Data on Children</legend> Child's Name <input type="text" maxlength="24" name="child_name_1" /><br /> sex (select: M/F)<span style="background-color: #89CFF0"> Male <input type="radio" name="sex_1" value="M" /></span><span style="background-color:pink"> Female <input type="radio" name="sex_1" value="F" /></span><br /> Date of Birth <input type="date" max="2012-02-25" step="1" required="required" name="special_1" /> </fieldset> Get the date of birth thing from google here http://code.google.com/p/input-type-date/downloads/detail?name=input-type-date-1.0.3.zip This has to be done in javascript, not php. Also notice the '_1' (there is a lot of em) this has to be increased for each child.
  20. You really don't need ajax for this. A simple js will do it useing position absolute and changing the left or right value, but here's one in css3: http://www.1stwebdesigner.com/tutorials/slide-out-panel-css3/
  21. I order to make life easier on the people that are trying to help you, Please do not include line numbers in the posted code! The idea of the code boxes is to make copy and paste easy to put your code into our editors when needed. Then you have to remove your line numbers. Not easy And please use the correct names "the click to play div" is not the correct name clickToPlay is the name of the div. Using the wrong name renders a search non useful and I had to eye ball where the div and css was located. Thank you for your support. why the click to play div isn't under the navbar You have put clickToPlay inside of mainContent and centered that. So the clickToPlay is centered. Remove it and put it where you will. why the news div isn't beside the recentNews div. Both of these are in mainContent and mainContent has width: 550px; your two, news and recentNews divs have width: 400px; and width: 150px; That would work if you didn't have borders which adds to the width. Adjust both to get things the way you want.
  22. @fenway I've never seen MATCH --- AGAINST Shouldn't it be $res = mysql_query("SELECT * FROM entry WHERE `entry_text` = '$search_string'")or die (mysql_error());?
  23. This may not be the best way, but this is what came to mind: <?php function fixpic($name){ $ray = explode('.', $name); $ltag = '_'.$ray[count($ray)-1]; $rtag = '.'.$ray[count($ray)-1]; $name = implode('_', $ray); return(str_replace($ltag, $rtag, $name)); } $name = 'file.to.upload.jpg'; $new = fixpic($name); echo $new; ?>
  24. First your boxes must share the same name: Have you ever griefed: <label> <input type="radio" name="cbox" value="no" id="choice_0" /> No</label> <br /> <label> <input type="radio" name="cbox" value="yes" id="choice_1" /> Yes</label><br /> Your php to find the value is: $cbox = $_POST['cbox']; The var. cbox will be 'yes' or 'no' depending on which is selected.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.