Jump to content

yomanny

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by yomanny

  1. You're ending the table with </table> inside of the while-loop but you don't start any <table> in the loop. Might that be the problem? Move </table> outside of the loop and make sure there's a <table> tag before the loop aswell. Also, you can remove this condition: && $i<$num_rows The loop will stop when it's gone through the results from the query. - W
  2. Hi, I think what you're looking for is CONCAT, read more about it here http://www.plus2net.com/sql_tutorial/concat.php Hope you work it out! - W
  3. I'm not sure what you mean, use a div tag to save an image on the server? Confusing. Anyway, usually you save the image on the server and in the database you save the filename (and the path if you wish). No idea what you're really talking about, but read up on how to let users upload an image to the server. A quick google search gave me http://www.tizag.com/phpT/fileupload.php - W
  4. Ok, by automate you mean that when the user visits the page some radio buttons should be automatially checked, so the user doesn't have to do it? In a radio button you can add checked within the tag, like so: <input type="radio" name="topic" value="WO" CHECKED>Wohnen<br> You can also add disabled to make it impossible for the user to check it. - W
  5. It doesn't seem to have any ID actually. I assume you mean an ID for the whole form? I see no <form> tag either! - W
  6. Just tried your code out, but I don't really understand what you mean by "a gap". I see no gap? Please elaborate and I'd love to help you.
  7. You could send them to a page called exit.php and along with it send a parameter with the new URL, like this: confirm.php?url=http://yahoo.com Then, in exit.php you fetch the url, something like: $url = $_GET['url']; echo '<a href="' . $url . '">Click here to leave my website.</a>'; Hope it helps! - W
  8. Perhaps it's failing at this line, and therefore redirects you to ./index.php ? // login check try { JSON.parse(data); } catch (e) { location.href = './index.php'; return; } - W
  9. Grab the IP with the $_SERVER variable and store it in a database with a counter which you just increase for every visit.
  10. Add a CSS rule to the <tr> in case it should be bold, like this: <tr style="font-weight: bold;"> But if you plan to style your stuff more later on, read up on CSS and create classes in .css files instead. - W
  11. In radioform.php on line 9 you must also tell the script where to send the form data (should be simplescript.php) with action="simplescript.php" So edit the line to the following: <form action="simplescript.php" method="POST" enctype="application/x-www-form-urlencoded" name="radioenquiry" id="radioenquiry"> - W
  12. It's recommended to use tables when creating HTML styled emails, also keep in mind that images won't show in lots of email clients (e.g. Gmail). Different clients also handle CSS differently, so if I were you I would just throw together a basic HTML table with some background and text colors. - W
  13. Can you please put the code inside code tags so it's readable? (the <> icon in the WYSIWYG editor) =) - W
  14. Just Google and you'll find tons of plugins for it. If you like Ketchup I'm pretty sure you'd enjoy the Ketchup jQuery plugin, it seems handy: http://demos.usejquery.com/ketchup-plugin/ /Andreas
  15. if(count($errors) > 0){ foreach($errors AS $error){ echo $error . "<br>\n"; } } // Add this and it'll work else { mysql_query("INSERT INTO accounts (firstname, lastname, nickname, age, password, gender, email, access, ip, page, date) values ('$regfname', '$reglname', '$regnickname', '$regage', '$pass1', '$regender', '$regemail1', '$regaccess', '$regip', '$regpage', '$regdate')"); } } You don't close the if before you start your else, you only close your foreach. - W
  16. Here's some code for you to work with: <style> body { background-image: url('http://sweets.seriouseats.com/images/2013/03/20130312-dulce-de-leche-ice-cream.jpg'); } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> var images = new Array(); var random; images[0] = 'http://outsetmedia.com/sites/default/files/51703-ice-cream.jpg'; images[1] = 'http://2.bp.blogspot.com/-s3lF9zAAQJA/USpFPNZ8bTI/AAAAAAAAJZ8/8YgC7aXCBBg/s1600/Dr.SeussIceCream2.jpg'; images[2] = 'http://sweets.seriouseats.com/images/2013/03/20130312-dulce-de-leche-ice-cream.jpg'; $('document').ready(function() { // Every 3rd second the following code will be executed setInterval(function() { // Generate a random number between 0 and 2 random = Math.floor(Math.random() * 3); // Change the CSS $('body').css('background-image', 'url('+images[random]+')'); }, 3000); }); </script>
  17. Working code <script> $('document').ready(function() { $("#premium_seat").click( function(){ if($('#premium_seat').is(':checked')) { alert('Bingo'); } }); }); </script>
  18. Then put it in there and see if it helps, sir.
  19. Is the click event code inside of document.ready ? I know I had trouble with stuff like this when my event-binding code wasn't inside of document.ready. - W
  20. Yeah, one way would be to create an HTML file for each image, but if it is the "pretty URL" part you're concerned about I really think you should do it for real. Read up a little bit on how to do this with .htaccess, it's easier than one might think. This will let you turn wallpapers/view.php?id=2 into wallpapers/view/2 Even better, right? Here's a link to get you started: http://net.tutsplus.com/tutorials/other/using-htaccess-files-for-pretty-urls/ - W
  21. I might be wrong, but it seems like you're including the UI library twice. Or are jquery UI Custom and jquery UI two different libraries? <script type="text/javascript" src="jQui/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="jQui/js/jquery-ui-1.8.18.custom.min.js"></script> - W
  22. Welcome! I think you should try to learn a bit of jQuery for that, it's really helpful for stuff like handling forms on the client side. Drop a line in the Javascript section if you get stuck. - W
  23. Create a function called getRandomLetter() or something, which: 1. Generates a random number, rand($min, $max). 2. Returns the element in the array with the generated number, like: return $mixedL[$randomizednumber] Then call this function every time you need a new number. - W
  24. I think I've spotted the problem. You increase $i before populating the arrays, which means $itemDesc[0] and $itemQuantity[0] are empty. So simply try changing your while to this: while ($row = $result->fetch_assoc()) { $itemDesc[$i] = $row['itemDesc']; $itemQuantity[$i] = $row['itemQuantity']; $i++; } Now you'll start populating $itemDesc[0] and go up. - W
×
×
  • 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.