Jump to content

pengu

Members
  • Posts

    154
  • Joined

  • Last visited

    Never

About pengu

  • Birthday 07/01/1988

Contact Methods

  • AIM
    ThatsCoolWatEva
  • MSN
    wazzup_lala@hotmail.com

Profile Information

  • Gender
    Not Telling
  • Location
    Australia

pengu's Achievements

Member

Member (2/5)

0

Reputation

  1. Amazing, thought someone would respond by now. Anyways, I've got this far (see code). But it's not loading my pages into the DIV. Works firefox. No go Chrome. <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.spLink').click(function(e) { e.preventDefault(); var href = $(this).attr('href'); $('.spResult').load(href); //alert(href); }); }); </script> </head> <body> <h1>Test</h1> <p><a href="./test.html" class="spLink">Click</a></p> <p><a href="test2.html" class="spLink">Click</a></p> <p><a href="test3.html">Click</a></p> <div class="spResult"> </div> </body> </html>
  2. First off, I hope I've posted this in the correct spot. Apologies if I have not. All I want is a couple of links, lets say 1 2 and 3, they're all href links that lead to some page, but they have an "id" within the HREF. So when I click them, I want them to load the results into a div, not just load another page. What I have so far.. <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $("#spLink").click(function(){ $("#spResult").html(ajax_load).load(); }); </script> </head> <body> <h1>Test</h1> <p><a href="test.html" id="spLink">Click</a></p> <p><a href="test2.html" id="spLink">Click</a></p> <p><a href="test3.html" id="spLink">Click</a></p> <div id="spResult"> </div> </body> </html> Help!
  3. Hi, I'm trying to figure out how to get some numbers out of a string. Example of strings $string1 = "3-tech"; $string2 = "109-bobby"; $string3 = "4-Charlie1994"; $string4 = "55-Mr-Smith"; What I want to do is grab everything BEFORE the "-" and the first dash. I'm having a brain meltdown atm and just can't figure it out, I know it's something simple.
  4. Thanks for your help.. but I disagree about security. Performance I'm not quite sure. Will wait to see what others say.
  5. It doesn't appear to have anything to do with the mail() function. Echo out $body to make sure there is no errors with it. Seems to be an error with your hosting.
  6. I can't post too much.. sorry. Basically vBulletin is able to do something as following. somepage.php <?PHP include "globals.php"; //can't remember what it is exactly called.. echo $vbulletin->userinfo["userid"]; echo $vbulletin->userinfo["posts"]; //etc etc ?> Now I have my own database, seperate to vBulletin, full of information that I need.. lets say its a shopping cart as an example, basically wont something the same as this vbulletin to have like, I don't know a count of how many items are in "my" shopping cart. I hope this helps.
  7. I could, but then I'd have a million things in sessions. I also want something dynamic, so if the database changes, say more items are added, the sessions wont reflect this change.. unless set again.
  8. Hi guys, I'm just curious as to how I would go about to create a "globals.php" page much similar to the one vBulletin uses just as an example. I have some ideas but I'm not 100% sure. In my mind it works sort of like this. - Do a query to grab all relevant data for the user - Put it in an array - Take data from array .. $array['user'] (example) Could anyone tell me if I'm waaaaaaaaay off and if so offer some guidance, links perhaps? Thank you!
  9. <?PHP $file = $_GET['id']; switch ($file) { case 1: include '1.php'; break; case 2: include '2.php'; break; case default: include 'default.php'; break; } ?> Something like that?
  10. Thanks. Know any decent tutorials?
  11. I know I could do it that way. But.. Any point in using Prepared Statements? (Security wise)
  12. I swear I had read a tutorial on this site, but I must be mistaken as I can't find it. I did some googling on it.. but not to happy with the tutorials. Just wondering if someone could point me in a better direction. I'm wondering if I can take advantage of these. Like if I put these in a "config" file that is called on every PHP page and I have 2 or 3 SQL queries that I always want to run, a SELECT and UPDATE (maybe a delete). I could call these at will.. right? Without having to rewrite the query a million times? Any help is most appreciated.
  13. There is a forum dedicated to these sort of questions. You do realise this is the PHP Coding help forum, right?.. http://www.phpfreaks.com/forums/css-help/ - CSS help.
  14. As said above. Names are wrong. Keep in mind you're uploading your files to a PUBLIC forum. You should ALWAYS ALWAYS, change your usernames/passwords in files you upload. <label>Username: </label><input type="text" style="height: 1em;" size="15" name="username" required> <--! this should be username.. not password --> <br> <label>Password: </label><input type="password" style="height: 1em;" size="15" name="passWord" required>
  15. http://www.phpfreaks.com/forums/ajax-help/
×
×
  • 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.