Jump to content

davelearning

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

davelearning's Achievements

Member

Member (2/5)

0

Reputation

  1. hmm, easiest way I can think of is hide your previous form and show the new updated one?
  2. Hi all, Firstly here is my code <?php if (isset($_POST['update'])) { include('../config.php'); $name = $_POST['name']; $email = $_POST['email']; $id = $_POST['id']; $uquery=mysql_query("UPDATE customers SET name='$name' AND email='$email' WHERE id='$id'"); if($uquery) { echo mysql_error(); } else { echo mysql_error(); } } ?> <link href="../styles/clientbox.css" rel="stylesheet" type="text/css"> <link href="cancelform.css" rel="stylesheet" type="text/css" /> <link href="../styles/form_dark.css" rel="stylesheet" type="text/css" /> <body><br> <h3>My Details</h3> <div class="text"> Please keep your details updated below, for security reasons you cannot change your password.<br> <?php $id = $_GET['id']; include('../config.php'); $query=mysql_query("SELECT * FROM customers WHERE id='$id'"); while($row = mysql_fetch_assoc($query)) { $name = $row['name']; $email = $row['email']; } ?> <form class="dark" action="" method="post"> <ol> <li> <fieldset> <legend>My Details</legend> <ol> <li> <label for="name">Account Holder</label> <input type="text" id="name" name="name" value="<?php echo $name;?>" /> </li> <li> <label for="email">Contact/Login Email Address</label> <input type="text" id="email" name="email" value="<?php echo $email;?>" /> <input type="hidden" id="id" name="id" value="<?php echo $id;?>" /> </li> </ol> </fieldset> </li> </ol> <p style="text-align:right;"> <input type="reset" value="CANCEL" /> <input type="submit" value="UPDATE" name="update" /> </p> </form> Basically what is happening is that whatever you enter into the name box returns a 0 if its text or 1 if numbers are entered as opposed to storing the value inputed, if the email address is changed then nothing happens at all. Can someone see if I have made a noob mistake somewhere? The name and email fields are both varchar(256) in my database Thanks
  3. Hi all, I have the following which displays my posts on a wordpress blog <?php $x = 0; while (have_posts()) : the_post(); update_post_caches($posts); $x++; ?> <li<?php if ($x % 2) { } else { echo ' class="right_col"';} ?>> <?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { $thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' ); $img = $thumbURL[0]; } else { unset($img); if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } else { if (!$img) { $img = catch_that_image($post->ID); } } } if ($img) { $img = wpzoom_wpmu($img); ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&w=75&h=75&zc=1" alt="<?php the_title(); ?>" /></a><?php } ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><span class="comm_bubble"><?php comments_popup_link('0', '1', '%', ' ', ' '); ?></span> <span class="meta"><?php the_time("$dateformat $timeformat"); ?> <?php edit_post_link( __('Edit', 'wpzoom'), ' ', ''); ?></span> <?php wpe_excerpt('excerpt_tabs', 'wpe_excerptmore'); ?> </li><?php endwhile; ?> </ul><?php endif; ?> What I would like to do is limit the max posts to 6, but I cant seem to work out a way of doing it! Any pointers? Cheers
  4. Hi all, this is a shot in the dark as the code wasnt written by me and its a mess, I was just wondering if anyone would have a quick look at http://www.meetster.ch/ and see if their is an obvious reason why it looks so screwed in ie, in chrome it displays fine! He has about 5 different css files, and it looks like a lot of moo-tools stuff, I cant make head nor tail of it to be honest
  5. no, but there was a mysql_fetch_assoc($query) ! Thank you once again for pointing me in the right direction
  6. I appear to be having a simple simon day! my foreach is only displaying the last result in the table as opposed to each row $num_rows = mysql_num_rows($query); echo "There are $num_rows records.<br>"; while($row = mysql_fetch_row($query)) foreach ($row as $field) { echo '<div class="results">'; echo $field; echo '<br></div>'; } And the source <link href="../styles/clientbox.css" rel="stylesheet" type="text/css"> <body><br> <h3>My Services</h3> <div class="text"> You currently have the following services with us: </div> There are 2 records.<br><div class="results">test1<br></div> </body> </html> My table has 2 rows which the 1st one has a package of test and the second a package of test1 Can anyone help? Thanks
  7. ehhm, they are the same and it does work... The insert query I had the created $variable contained the error I should have just echoed out my variable Dunce hat on head....
  8. Thanks for the replies Yup exactly the same I wasnt sure, it works with them in!
  9. This may sound a bit stupid, but I cant get an if statement to work! I can get it to run if the answer is a number, eg if($variable=="1") { } but what if its a word? eg if($variable=="hello world") { } I cant get this to work! Cheers
  10. dammit, ive been looking at this for hours! Many thanks
  11. Hi all, I am wondering if nayone can spot why more form is not processing, basically the page just loads afresh once details have been entered and submit button clicked The page is called client.php <?php session_start(); if (isset($_POST['submit'])) { include('config.php'); $username = $_POST['username']; $password = md5($_POST['password']); $query = mysql_query("SELECT email,password FROM customers WHERE email='$username' AND password = '$password'"); $count=mysql_num_rows($query); if($count==1) { $query1= mysql_query("SELECT id FROM customers WHERE email='$username'"); echo mysql_error() ; while($row = mysql_fetch_assoc($query1)) { $id = $row['id']; $_SESSION['id'] = $id; $_SESSION['logged'] = "SET"; header("Location: client.php?id=$id"); } } else { echo "<script>alert('Incorrect Login Details')</script>"; } } ?> <link href="styles/style.css" rel="stylesheet" type="text/css" /> <link href="styles/form_clean.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="scripts/pageload.js"></script> <script type="text/javascript"> function swapImages(that) { that.src = (that.src.indexOf('buttonselected')>-1) ? ("images/"+that.id+"button.gif") : ("images/"+that.id+"buttonselected.gif"); } </script> <link href="styles/form_clean.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="main"> <div id="links"> <a href="index.php"><img src="images/homebutton.gif" alt="Home Button" class="buttons" id="home" onmouseover="swapImages(this)" onmouseout="swapImages(this)" /></a> <a href="javascript:ajaxpage('packages.php', 'content');"><img src="images/packagebutton.gif" alt="Packages Button" class="buttons" id="package" onmouseover="swapImages(this)" onmouseout="swapImages(this)" /></a> <a href="javascript:ajaxpage('purchase.php', 'content');"><img src="images/purchasebutton.gif" alt="Purchase Button" class="buttons" id="purchase" onmouseover="swapImages(this)" onmouseout="swapImages(this)" /></a> <a href="javascript:ajaxpage('contact.php', 'content');"><img src="images/contactabutton.gif" alt="Contact Button" class="buttons" id="contacta" onmouseover="swapImages(this)" onmouseout="swapImages(this)" /></a> <a href="client.php"><img src="images/clientbutton.gif" alt="Client Button" class="buttons" id="client" onmouseover="swapImages(this)" onmouseout="swapImages(this)" /></a> </div> <div id="logobox"><img src="images/logo.png" alt="JollyHosting.com - Simplified Reseller Hosting"/> </div> <div id="content"> <img src="images/gaptop.png" alt="seperator" /> <?php if(!isset($_SESSION['logged'])) { ?> <h2> Please Login</h2> <div id="login"> <form class="clean" action="client.php" method="post"> <ol> <li> <fieldset> <legend>Login</legend> <ol> <li> <label for="username">Email Address</label> <input type="text" id="username" name="username" value="" /> </li> <li> <label for="password">Password</label> <input type="password" id="password" name="password" value="" /> </li> </ol> </fieldset> </li> </ol> <p style="text-align:right;"> <input type="submit" value="OK" /> </p> </form> </div> <?php } else { echo "loggin in"; } ?> </div> <?php include('footer.php');?> </div> </body> </html> Many thanks
  12. In fact, ignore me completely, it helps if you can enter the right email address!
  13. Ok quick update, I got it working in sandbox by creating a buyers account, d'oh! However I still get the same error when moving over to a live account
  14. Hi all, This is driving me insane! Basically I am simply trying to setup a reoccurring payment, in live and sandbox I get an error once I submit login details The link you have used to enter the PayPal system is invalid. Please review the link and try again. The code I am sending to paypal is: header("location: https://www.sandbox.paypal.com/cgi-bin/webscr? cmd=_xclick-subscriptions& business=sandbox@minecraftclan.com& item_name=Item1& a3=3.00& p3=30& t3=D"); My sandbox account is 'sandbox@minecraftclan.com', I really cant see what the issue is! It will show the payment screen, but error occours after logging in with sandbox details, the same if I run to the live site and use an real paypal account Any ideas? EDIT: This iswhat a view source on the error page looks like: s.prop1="xpt/Merchant/hostedpayments/Error"; s.prop6="6FW885512W222534S"; s.prop7="Personal"; s.prop8="Verified"; s.prop9="Unrestricted"; s.prop10="US"; s.prop14="The link you have used to enter the PayPal system is invalid. Please review the link and try again."; s.prop16=""; s.prop34="PayPalCredit:Servicing:CO:NoTransactions"; s.prop15=""; s.pageName="xpt/Merchant/hostedpayments/Error::_flow"; s.prop50="en_US"; s.prop18=""; That mean anything to anyone?!
×
×
  • 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.