Jump to content

hazz995

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

About hazz995

  • Birthday 04/30/1991

Profile Information

  • Gender
    Male

hazz995's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm just messing around with a website layout. I'm more of a developer than a designer but I want to boost my creative abilities so that I can actually create a decent looking website for those that are interested. More than a few times I've been assigned to create a website from scratch rather than playing around with server side code like I prefer. So here's to bolster my skills. I haven't put it online yet, it's just sitting on my local XAMPP server, so here's an image (for now): Any ideas are welcome, any at all.
  2. Thank you, I was actually just looking into the PayPal sandbox feature the other day an I'm glad you brought it up since I'm now confident I can continue looking into it. Your overall post has been really helpful and I now have a better understanding on how to deal with PayPal with my clients. Thanks again .
  3. Alright thanks, I'm gonna look into it and see what I can come up with.
  4. Okay so a client wants PayPal integrated into their website, such as a buy button etc..etc... Easily done. But what's stumping me is how do you handle the PayPal details? Because as far as I know you access to the business PayPal account you're setting up products form. So the client will have to give me access to their PayPal so that I can add buttons etc to their site? What happens if they don't have a business PayPal account, do I just set one up in their stead? I know there's a few questions but I just started looking into PayPal for my clients and I find it hard accepting the fact that I have access to someone else's PayPal just to add buttons and stuff. Is this really necessary or are there other ways of doing it? Either way I would like to hear how other people deal with PayPal and their clients.
  5. Woo thanks guys, solved! Never knew you could write to div tags with JS.
  6. Alright just started learning JS and I'm having a few problems. I'm trying to make some form validation code with the help of a timer but the page keeps going blank every time it runs (with the exception of the text that is told to be outputted). <script type="text/javascript"> var usererror = ""; //NULL STRING var passerror = ""; //NULL STRING function CheckUsername() { usererror = "Test"; } function UpdateError() { document.write(usererror); t=setTimeout("UpdateError()",1000); } </script> </head> <body> <div class = "template"> <form action = "" method = "post" name = "formlogin"> <table> <tr> <td width = '30%'>Username</td> <td width = '40%'><input type = "textfield" name = "username" onchange = "CheckUsername()"/></td> <td width = '30%' style = "color:red;"> <script type="text/javascript"> UpdateError(); </script> </td> </tr> </table> </form> </div> Basically what I'm trying to tell it to do is to output the correct text when an error is made within the username textfield but it's obviously not working and I have no more ideas on how to fix it. Sure the code is not complete and doesn't show the exact errors yet but I'll get to that once I get it to output text correctly... Thanks
  7. I've got it to write at the start of the file thanks to rewind but still one problem, if I open the file with r+ it overwrites existing data as it goes along instead of just nicely writing text at the start of the file without deleting anything. Start: existing text Run code: (inserting the text "hello" at the start) helloing text What I'm trying to achieve: helloexisting text I tried changing the r+ to w but that just wipes everything when writing. $string = "test text"; $fp = fopen("test.php", 'r+'); rewind($fp); fwrite($fp, $string); fclose($fp);
  8. I tried writing to a file, all existing code gets deleted. I tried appending but that only adds to the end of the file. How can I add to the start of the file without deleting the existing contents? Thanks.
  9. Alright I'm stuck on this one :/ My poor attempt at trying to +15 mins onto the users last active time, basically how I'm trying to get it to work: if users last active time + 15 mins is higher than current time then they are logged on, else logged off. I tried a few other methods but nothing worked, the lastactive time is in the same format as $date also. (Y-m-d h/i/s) $date = date("Y-m-d h/i/s"); if ($user['lastactive']+15 <=$date)
  10. I have a Last Login field which is a TIMESTAMP, so I'll just have to copy that field to Last Activity. I'll have to do some lookup on comparing time since I have no idea how.
  11. I want to display a field that says if a user is logged on or not, also depending on how long the user is inactive for then they will be identified as "logged out" (if the user comes back they are still logged in with the saved session though) Basically if the user has been inactive for 15 Min's then they are identified to other people as 'not online'. I'm not quite sure where to start with this so I just need a little nudge to get me started. Just the way to do it would be good enough, try to limit the amount of code because I want to try doing it myself, not saying I wouldn't mind some code to start me off though
  12. *facepalm* It completely slipped my mind... Thanks
  13. Trying to sort a table out by certain tags, like username, date registered and member type... No matter how many times I click the links the data wont sort, I had it working with only sorting 2 table columns but it broke when I attempted to add a 3rd. This is the code that starts the sort of, it works by extracting the sort variable from the url then using it to decide what column is being sorted, unfortunately it does not work. <?php $sort = $_GET['sort']; $connect=mysql_connect("localhost","root","root") or die("Could not connect"); mysql_select_db("dbmembers") or die("Could not find database"); if ($sort=0) {$query = "SELECT * FROM users ORDER BY date";} if ($sort=1) {$query = "SELECT * FROM users ORDER BY username";} if ($sort=2) {$query = "SELECT * FROM users ORDER BY admin";} echo "<center><table width=100% style=padding:5;><tr><td><b><a href='?sort=0'>Username</a></b></td><td><b><a href='?sort=1'>Date Registered</a></b></td> <td><b><a href='?sort=2'>Type</a></b></td>"; //Rest of table code... ?> Thanks.
  14. I changed the mysql_connect values before posting it in here. But thanks, I managed to get it working with the code you tidied up, just had to correct a few small things but I'm getting results
  15. I'm having trouble creating a loop that will echo all members in the database. I'm trying to get every member in the database to come out like this: Name1 | Date Registered Name2 | Date Registered and so on... <?php $user="root"; echo "Currently "; $connect=mysql_connect("localhost","dbuser","dbpass") or die("Could not connect"); mysql_select_db("dbmembers") or die("Could not find database"); $query = "SELECT * FROM users ORDER BY name DESC LIMIT 20"; $res = mysql_query($query) or die("Couldn't execute query: ".mysql_error()); $numrows = mysql_num_rows($query); echo "$numrows registered users." while ($user = mysql_fetch_assoc($res)) { echo " ".$user["username"]." ".$user["date"]."<br> "; } ?>
×
×
  • 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.