Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. you need to format the search value before you run the actual search query. so when the value entered is passed to the php code, <?php // if $location = KARNATAKA $location = strtolower($location); // would change it to 'karnataka'
  2. if you want to redirect the user to another webpage after a successful email send then change the end of your script to this: <?php // Send the email. if ( mail($to, $subjectline, $body, $security, "-f".$email)) { header('Location:confirmationpage.php'); // this will redirect the page to confirmation.php // if you want to send a confirmation email to the customer then you could throw it in here } else { header('Location:failure.php'); }
  3. wrap your config settings in speec marks: resources.db.adapter =" mysqli" resources.db.params.host = "localhost" resources.db.params.username = "vffgg" resources.db.params.password = "xxxxxx" resources.db.params.dbname ="ibbhhb" resources.db.isDefaultTableAdapter = "true"
  4. The data is being sent via ajax requests, you should look at php and ajax tutorials to get you started
  5. you need to use css positioning. make the main container relative and the baner and slidehow absolute. the z-index should kick in then: .banner { margin:0 auto; width:900px; height:130px; background:url(banner.png) no-repeat top left; z-index:3; position:absolute; top:0px; left:0px; } .slideshow { margin-top:-75px; width:800px; height:312px; z-index:2; position:absolute; top:0px; left:0px; }
  6. http://www.google.co.uk/search?aq=f&sourceid=chrome&ie=UTF-8&q=php+lottery+system isnt google amazing!!
  7. run it through the a regular expression
  8. ok, so logically, if the images arent loading, is the style sheet? chech the css tab in the console and make sure the path is right
  9. you could explode the string and use mktime to make a timestamp $date = "06-01-2011"; // 6th jan 2012 list($day, $month, $year) = explode('-', $date); $timestamp = mktime(0, 0, 0, $month, $day, $year); will give you 1294272000 (midnight on 6th jan 2012)
  10. you best get firebug installed in firefox or chrome then use net > images. this will give the a list of all the images that the browser is trying to load ( the absolute paths) from here you should be able to work out where it is looking for your files . (See the attached screenshot)
  11. function cart () { print "<table id='producttable' border='1'>". "<tr>". "<td class='td top'>Delete</td>". "<td class='td top'>Product Name</td>". "<td class='td top'>Quantity</td>". "<td class='td top'>Price</td>". "<td class='td top'>Sub Total</td>". "</tr>"; foreach($_SESSION as $name => $value) { if ($value>0) { if (substr($name, 0, 5) == "cart_") { $productid = substr($name, 5, (strlen($name)-5)); $query = mysql_query('SELECT * FROM product WHERE ProductID =' .$productid); while ($query_row = @mysql_fetch_array($query)) { $sub = $query_row["Price"] * $value; print "<tr>". "<td class='td'><a href='./cart.php?delete=".$productid."'> [Delete] </a></td>". "<td class='td'>".$query_row["Name"]."</td>". "<td class='td'>".$value."</td>". "<td class='td'>".$query_row["Price"]."</td>". "<td class='td'>".$sub."</td>". "</tr>"; } } @$total += $sub; } } print "</table>"; if (@$total==0) { echo "<p>Your basket is empty</p>"; } else { echo @" Total: &pound" .$total; ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="[email protected]"> <?php paypal_items(); ?> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="amount" value="<?php echo $total; ?>"> <input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but03.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> <?php } }
  12. depending on your server setup you may not need to touch your htaccess. most servers will default to .php (if index.php exists) I think what you are looking to do is get the user to try and log in, if nsuccessful show them the sercure page, if not then redirect with a message. One way is using the 'get' parameter in php. Example: change: die('That user does not exist'); to header('Location:index.php?error=notexist'); and in your index.php: <div id="username"> <form action="login.php" method="post"/> <table><tr><td> <img src="imgs/Log In/username.png" alt=""/> </td><td> <input type="text" size="30" name="username" style="background-color:transparent;" /> </td></tr></table> <table><tr><td> <img src="imgs/Log In/password.png" alt=""/> </td><td> <input type="password" name="password" size="30" /> </td></tr></table> <form id="submitb" action=""> <input type="submit" value="Log in" /> </form> <?php if($_GET['error']=='notexist'){ <p>Sorry, That username does not exist</p> } ?> <p class="register">Not yet a member? <a href="Form.html">Register Here</a>, its Free!</p> </div> now please be aware that this is a very basic example and by no means complete, but should give you an idea
  13. try json encoding the val array before you send it
  14. change your index.html to index.php
  15. where have you declared the date array?
  16. your not closing off your input tags. try changing: <input type="text" size="50" maxlength="50" name="rymwurd"> to <input type="text" size="50" maxlength="50" name="rymwurd" />
  17. I am going to presume that your structure for your usernames will follow the usual rules, ie minimum 6 characters etc. So all yo will need to do is where it checks if the string length is 0 change it if str lengh is less than the mimimum length required for your usernames ( ie less than 6) this will stop it triggering the ajax on every keystroke
  18. not too sure i understand what you want it to do? . do you mean drop some extra functionality into the calendar class to highlight a day dependant on a users ID?
  19. try changing this part: $.post( 'process.php', ( name, comment ), to: $.post( 'process.php', { name : name, comment : comment },
  20. So, i think your looking for something along these lines: <?php $sql = "SELECT `dates` from table"; $result = mysql_query($sql); $dates = array(); while($row = mysql_fetch_assoc($result)){ array_push($dates, $row['dates']); } $calendar->highlighted_dates = $dates; hope it helps
  21. i dont understand what you want us to do? if you want someone to do the work you may want to move your post to the freelancing section.
  22. he is correct, id's are meant to be unique, am javascript will only execute the first instance it finds, but using the each function correctly in jquery means you can refer to the Record divs child elements within a local scope. i have tried this locally and it works fine. treating each one individually: <div class="Record"> <div id="VeiwRecord">click me</div> <div id="ViewMoreHidden">Im hidden</div> </div> <div class="Record"> <div id="VeiwRecord">click me</div> <div id="ViewMoreHidden">Im hidden</div> </div> <div class="Record"> <div id="VeiwRecord">click me</div> <div id="ViewMoreHidden">Im hidden</div> </div> <div class="Record"> <div id="VeiwRecord">click me</div> <div id="ViewMoreHidden">Im hidden</div> </div> $('document').ready(function() { $('.Record').each(function() { var obj = $(this); $('#VeiwRecord',obj).click(function(){ $('#ViewMoreHidden',obj).slideToggle(2000); }); }); });
  23. sorry, didnt look at your code properly. iterating over the worng thing: $('document').ready(function() { $('.Record').each(function() { $('#VeiwRecord',this).click(function(){ $('#ViewMoreHidden', this).slideToggle(2000); }): }); }); have a play round with that
  24. $('document').ready(function() { $('#VeiwRecord').each(function() { $(this).click(function(){ $('#ViewMoreHidden', this).slideToggle(2000); }): }); }); havent tested it, but should point you in the right direction
×
×
  • 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.