Jump to content

killah

Members
  • Posts

    234
  • Joined

  • Last visited

    Never

Everything posted by killah

  1. Hi there, i have so far it appear's to be 2 problem's. One is when i click on my event trigger to pull up the popup, the overlay that my jquery is supposed to set is all correct. How ever, my popup first fade's in (Using JQuery.fadeIn()) over the overlay. Once it's faded in, it then appear's behind the overlay. Any idea's? My second problem is, I have not used the JQuery platform much, and just recently started using it. How ever, in normal javascript, if using php and javascript, i am used to using " + JScript.Var + ", i'm using this now and seem's to be throwing an error via firebug. All error's can be viewed here: http://deadlykillah.net/mccode/logout_test.php. * To see problem 1, please click on the "Register Now" image. Thank's.
  2. Hi there, i am a beginner of ajax and just got the grasp's of ajax. I am trying to find a way on how to timeout and print "Script took to long to load" if it take's over 30 second's to load another script once i clicked "Show Page". Any idea's or is there any ajax function that can do this for me?
  3. I subtracted 1 from the count as it was showing some what like this: Array ( [0] => [1] => firstimage[/img] [2] => secondimage[/img] ) So i had to remove 1 as [0] ain't supposed to be counting.
  4. This is how i worked it out rather: $string = explode('', $_POST['signature']); $count = (count($string) - 1);
  5. Would'nt it be much simpler to just do $u = $_GET['u']; echo $u; Thus resulting in 43
  6. What i want to do is limit the amount of image's a user can use, thus i need to check the amount of inside the bbcode signature. Any idea's?
  7. function GetXmlHttpObject() { var xmlHttp; try { xmlHttp = new XMLHttpRequest(); } catch(e) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch() { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch() { return false; } } } return xmlHttp; } function showUnSaved() { var unSavedXML = GetXmlHttpObject(); if(unSavedXML == NULL) { alert("Browser does not support javascript!"); } unSavedXML.open("GET","Ajax_Launcher.php?viewUnSaved", true); unSavedXML.onreadystatechange = function() { if (xmlHttp.readyState == 4) { document.getElementById("responseTable").innerHTML = xmlHttp.responseText; } } unSavedXML.send(null); return true; } function showSaved() { alert("Writing New Events Table"); var savedXML = GetXmlHttpObject(); if(savedXML == NULL) { alert("Browser does not support javascript!"); } savedXML.open("GET","Ajax_Launcher.php?viewSaved", true); savedXML.onreadystatechange = function() { if (savedXML.readyState == 4) { document.getElementById("responseTable").innerHTML = savedXML.responseText; } } savedXML.send(null); alert("Writing New Events Table 2"); return true; } function delSingle(id) { var singleXML = GetXmlHttpObject(); if(singleXML == NULL) { alert("Browser does not support javascript!"); } singleXML.open("GET","Ajax_Launcher.php?delSingle="+id, true); singleXML.onreadystatechange = function() { if (singleXML.readyState == 4) { document.getElementById("responseText").style.height = "25px"; document.getElementById("responseText").style.border = "1px black dashed"; document.getElementById("responseText").innerHTML = singleXML.responseText; } } singleXML.send(null); return true; } function saveThese() { var saveTheses = document.getElementById("select").value; var theseXML = GetXmlHttpObject(); if(theseXML == NULL) { alert("Browser does not support javascript!"); } theseXML.open("GET","Ajax_Launcher.php?saveThese="+saveTheses, true); theseXML.onreadystatechange = function() { if (theseXML.readyState == 4) { document.getElementById("responseText").style.height = "25px"; document.getElementById("responseText").style.border = "1px black dashed"; document.getElementById("responseText").innerHTML = theseXML.responseText; } } theseXML.send(null); return true; } Does anyone notice anything wrong with this? I have a ajax launcher php file that shows saved and unsaved event's, onclicking the button will change the entire table, but my javascript seem's to not want to work :S
  8. Bienvenido a phpfreaks.com, ojala te lo desfrutes
  9. <?php session_start(); $con = mysql_connect("localhost", "Username", "Password") or die('Could not connect: ', mysql_error()); mysql_select_db("DB_Name", $con); $username = mysql_real_escape_string($_SESSION["username"]); $SQL = 'SELECT `email` FROM `users` WHERE `username` = ', $username, ' LIMIT 0, 30'; $result = mysql_query($SQL) or die('Error in sql: ', mysql_error());+ $args = array(); while($soc = mysql_fetch_assoc($args)) { $args[] = $soc['email']; } echo implode('<br />', $args); ?> Maybe?
  10. WHATS WITH ALL THE CAPS? Do you like shouting? :/
  11. Do you currently count how many post's the user make's? If so: $query = mysql_query('SELECT `username` FROM `table` ORDER BY `post` DESC LIMIT 1', $resource_link); $user = mysql_fetch_assoc($query); echo $user['username'];
  12. Reload the page, as i just marked that out..
  13. I PM'ed it to you. Recheck the link if you got the disabled bit's.
  14. Your example work's perfect, it just doesnt work with my script for some reason :S
  15. Here's an update. curl_setopt($log, CURLOPT_URL, $url.'/usersonline.php'); $mat = str_replace(array('<','>'),array('[',']'), curl_exec($log)); echo $mat; $mat = preg_replace('~\[a href=\'viewuser.php?u=(.*)\'\](.*)\[/a\]~is','[pid]$2[/pid]', $mat); preg_match('~\[pid\](.*)\[/pid\]~is', $mat, $matches); print_r($matches); It displays: [a href=viewuser.php?u=2]Kyle[/a] But it simply won't grab the bit inside ]YY[ I just noticed your using preg_match when it's supposed to be preg_match_all, but now my array returns: Array ( [0] => Array ( ) [1] => Array ( ) )
  16. Ok, let me explain this bit. Basicly it log's into a full layout site, thus is why im using htmlentities/htmlspecialchars.. I need to search then for &lta href='viewuser.php?u=[0-9]'>[a-z0-9 _-!]</a> Hope you can maybe figure a solution to that
  17. This is what i got: $mat = htmlentities(curl_exec($log)); preg_match('~<a href=\'viewuser.php?u=(.?)\'>(.?)</a>~isS', $mat, $matches); print_r($matches); except it doesnt pick up the \'viewuser.php?u=xx\' if i change my pattern to '~<a>' it picks up every link on the site.
  18. Returns empty: Array ( )
  19. Care to post an example?
  20. I am currently stuck on a solution. Let me explain, i have built a script which will take my test site & register the account, after that it then log's the account in. After the account has logged in. I need it to send it to another script.. Ok i got the script working to this part. The script basicly work's like this. Post form data -> register.php -> login.php -> mailbox.php?action=send so far that work's and send's the mail. My problem stand's that the user were sending to, can be anything. This is why i have came here. I need my curl script to send to usersonline.php and get a name inbetween a url link (<a href='viewuser.php?u=xx'>YY</a> xx => id, YY => name), i need to grab YY and put it in an array, so i can use it later on. Is there anyway to grab a name inbetween a html tag using cURL? I have the rest covered by going to usersonline.php and all. Thank's.
×
×
  • 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.