Jump to content

maxihobbs

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

maxihobbs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is a head scratcher for me, im doing a site for a client which includes an image slider. In firefox all works fine but in all other browsers there are three missing image icons at the bottom of the image when you hover over it. I've gone through all the code changing bits to try and make them disappear the javascript and css are shown below. Basically I want these 3 missing image icons gone so it appears as it does in firefox with a caption at the top and the number of images appearing at the bottom without the image icons, thanks in advance JAVASCRIPT <script type="text/javascript"> var mygallery=new simpleGallery({ wrapperid: "llanrumney", dimensions: [440, 200], imagearray: [ ["images/firsts_gallery.jpg", "", "", " First's"], ["images/thirds_gallery.jpg", "", "", " Third's"], ["images/oldboys_gallery.jpg", "", "", " Old Boys"], ], autoplay: [true, 2500, 4], persist: false, fadeduration: 500, oninit:function(){ }, onslide:function(curslide, i){ } }) </script> CSS #gallery-wrapper { width: 400px; height: 200px; margin-bottom: 20px; } #gallery { width: 200px; } #gallery img.output { width: 604px; height: 375px; margin-bottom: 6px; margin-left: 4px; border: solid 5px #FFE3B5; } #gallery span.caption { display: block; margin: 1em 0 1em 0; } #thumbnail-bg { background: #F3F0E6; } #gallery ul.thumbnails { width: 100%; list-style: none; margin: 0; padding: 0 0 0 5px; } #gallery ul.thumbnails li { float: left; margin: 0 8px 1em 0; } #gallery ul.thumbnails li img.active { border: solid 5px #FFC15E; } .transparent { } PS - THE LINK IS www.maxihobbs.com/llanrumney
  2. I'm not expecting someone to hand feed me the answer, I've tried everything suggested and much more so I'd rather you not accuse me of not investigating as that's garbage. I'm just after some advice and as stated, I apprieciate all the help given, but as yet, it hasn't solved the issue
  3. Thats the problem, it is the password and username in the database, I've tried it with numerous users. All the errors works fine but it wont actually change my password without saying password and username do not match our file Very confusing!
  4. Ok Ive been playing around and although I now have no errors. I now have a page that responds with "Password and email do no match what is on file." The code is here <?php session_start(); include("db_connect.php"); ?> < <?php // Check if the form has been submitted. if (isset($_POST['submitted'])) { $errors = array(); // Initialize error array. // Check for an email address. if (empty($_POST['email'])) { $errors[] = 'You forgot to enter your email address.'; } else { $e = mysql_real_escape_string($_POST['email'], $con); } // Check for an existing password. if (empty($_POST['password'])) { $errors[] = 'You forgot to enter your existing password.'; } else { $p = mysql_real_escape_string($_POST['password'], $con); } // Check for a password and match against the confirmed password. if (!empty($_POST['password1'])) { if ($_POST['password1'] != $_POST['password2']) { $errors[] = 'Your new password did not match the confirmed new password.'; } else { $np = mysql_real_escape_string($_POST['password1'], $con); } } else { $errors[] = 'You forgot to enter your new password.'; } if (empty($errors)) { // If everythings OK. // Check that theyve entereed the right email address/password combination. $query = "SELECT id FROM users WHERE (email='$e' AND password=SHA('$p') )"; $result = mysql_query($query); $num = mysql_num_rows($result); if (mysql_num_rows($result) == 1) { // Match was made. // Get the user_id. $row = mysql_fetch_array ($result, MYSQL_NUM); // Make the UPDATE query. $query = "UPDATE users SET password=SHA('$np') WHERE id=$row[0]"; $result = @mysql_query ($query); if (mysql_affected_rows() == 1) { // If it ran OK. // Send an email, if desired. // Print a message. echo'<h1 id="mainhead">Thank you!</h1> <p>Your password has been updated.</p><p><br/></p>'; } else { // If it did not run OK. echo '<h1 id="mainhead">System Error</h1> <p class="error">Your password could not be changed due to a system error. We apologize.</p>'; // Public message. echo '<p>' . mysql_error() . '<br/><br/>Query: ' . $query . '</p>'; // Debugging message. include ('./footer.html'); exit(); } } else { // Invalid email address/password combination. echo '<h1 id="mainhead">Error!</h1> <p class="error">The email address and password do not match those on file.</p>'; } } else { // Report the errors. echo '<h1 id="mainhead">Error!</h1> <p class="error">The following errors(s) occurred:<br/>'; foreach ($errors as $msg) { // Print each error. echo " - $msg<br/>\n"; } echo '</p><p>Please try again.</p><p><br/></p>'; } // End of if (empty($errors)) IF. mysql_close(); // Close the database connection. } // End of the main Submit conditional. ?>
  5. Ok so I've tried option 2 and now have this code... $e = mysql_real_escape_string($con, trim($_POST['email'])); which shows this error Warning: mysql_real_escape_string() expects parameter 1 to be string,
  6. Where does this include... in the db_connect file or the same file? How would I go about this something like function escape_data(); ?
  7. Fatal error: Call to undefined function escape_data() Any ideas guys, I've scoured forums to no avail. The line of code it relates to is: $e = escape_data($_POST['email']); Many thanks
  8. Im trying to create some code for XML errors such as 100, 120, 200 etc. I have error 110, required parameter missing working fine. Any good ideas or references for trying to tackle these at all?
  9. Are there any simple Change password scripts out there I could implement into a project of mine? I have a rest password feature but clearly, I'd need a change password feature to go with this. Thanks in advance to help
  10. Thats fantastic mate, solved and done! Now for the Chnage password feature! :-\
  11. Ive uploaded it to my site and Im getting this error Fatal error: Call to undefined function error() the line it relates to is: else { error('New Password Sent!.'); } Any ideas?
  12. I'm trying to call each user's uploaded images from a database into my site for others to view. I currently have their personal information such as name and email which have been called from a MYSQL database, but I have no idea how to call each users separate images? Any ideas at all. My code for the page is here: <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("robinstalk") or die(mysql_error()); if (isset($_GET['member'])) { // connect to database. $sql = "SELECT * FROM users WHERE first = '{$_GET['member']}'"; $result = mysql_query($sql); if ($result) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); echo "<br /> <br /> First Name : {$row['first']} <br /> <br /> Last Name : {$row['last']} <br /> <br /> Email : {$row['email']} <br /> <br /> About : {$row['about']} <br /> <br /> Pictures: THIS IS WHERE IM STUCK AT WHAT TO PUT "; } } } ?>
  13. SOLVED! Thanks a bunch, learning these things fast!
  14. Sorry forgot that bit! Blank page, nothing shown at all
  15. Im creating an online football community site for members to join and I'm having trouble retrieving the data from MYSQL, it works fine on my other pages, any ideas would be grateful. Thanks <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("robinstalk") or die(mysql_error()); if (isset($_GET['id'])) { // connect to database. $sql = "SELECT * FROM users WHERE first = '{$_GET['member']}'"; $result = mysql_query($sql); if ($result) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); echo "<br /> <br /> {$row['first']} <br /> <br /> Last Name : {$row['last']} <br /> <br /> Email : {$row['email']} <br /> <br /> About : {$row['about']} "; } } } ?> This page is called view_profile.php and is supposed to show the user, that members data, the page beforehand is called members.php
×
×
  • 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.