Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. 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');
       }
    

  2. 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"

  3. 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;
    }
    

  4. 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)

    post-109226-13482403157577_thumb.png

  5. 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="kamran193@hotmail.co.uk">
                                    <?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
    				}
    				}
    
    
    

  6. 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

  7. 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

  8. 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

  9. 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);
                                                         });
    
    
    	});
    
    });
    

  10. 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

  11. $('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.