
jaymc
Members-
Posts
1,521 -
Joined
-
Last visited
Never
Everything posted by jaymc
-
Hi, I dont know much about javascript, only the basics Im trying to get the cursor selected in a textarea when the page is loaded How can I achieve this? Thanks!
-
Ok cheers I'll look into those options Thanks
-
[quote author=mjdamato link=topic=113325.msg460544#msg460544 date=1162306964] Well, there is one way to attempt to do this, but it won't work for every email client that the recipient may be using. The trick is to make it an HTML email and to include an image link to a php page that returns a transparent gif. When that specific gif is accessed (by the person reading the email) you will know they have read it. however, if the user's email does not render the HTML or if it blocks images by default, this will not work. For example, you send an email to Bob and make the source for an image as www.mysite.com\blank.php&user=bob123. You could use any variable instead of 'user' but the value for each email sent must be unique. When the email is sent you store the information about the email and the unique identifier in a database or flat file. This would most likely be done in an automated process. Then you create the php page that the user will reach when trying to download the image. The page will record that the particular user accessed the file. [/quote] Yeh thats what I would have done Good thinkin I cant really see their being any real feasable way around this, is does rely completely on the mail client the person is using. So the only real way is by using little tricks such as the image example
-
[quote author=joshi_v link=topic=113343.msg460496#msg460496 date=1162301016] If you just want to post the whole stuff again , i think u can use headers to redirect to the same file! If it is in JavaScript ,you can use, [code]window.location.href='filename with file path' ;[/code] Regards, Joshi. [/quote] Thats the opposite to what I want to do I just want the data posted once, as normal, but make sure that if they refresh the page all the data isnt submitted again
-
Ive made a PM system, when sending a message the info is posted to the next page and then read in and processed... However, if you simply refresh that page it obviously resends all the data (after clicking 'retry') This is an ideal way for someone to spam someones mail box very quickly I'm just wondering how to combat the refresh action from resubmitting all the data I dont want to start messing about with max amount of messages someone can send in a minute, I jsut want to stop it from resubmitting all the data and have it processed when they click refresh Thanks
-
Ok, I want to create like an iframe type feature Basically, have a large amount of content in an area but not have it stretch the page The usual way to combat this is to just use an iframe, and of course have the content scroll within the iframe Well, is their anyway to do this without frames? Perhaps using javascript
-
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/jaydio/public_html/site/login/whosonline/index.php on line 161 Here is line 161 [code]$scfp = fsockopen($reqqq, "2005", &$errno, &$errstr, 4);[/code]
-
Worked perfect! Thanks!!!!
-
Ive got this example working fine, still got a problem though which i'll explain later [code]<?php function sort_text($a, $b) { $a_parts = preg_split('/([0-9]+)$/', $a, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); $b_parts = preg_split('/([0-9]+)$/', $b, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); if (0 == ($cmp = strcmp($a_parts[0], $b_parts[0]))) { $a_num = isset($a_parts[1])? (int)$a_parts[1]: -1; $b_num = isset($b_parts[1])? (int)$b_parts[1]: -1; if ($a_num == $b_num) { return 0; } return ($a_num < $b_num)? -1: 1; } else { return $cmp; } } $a = array('b', 'b 01', 'a 1', 'a 31', 'a 30', 'a 15', 'a 10', 'a 01'); print_r($a);[/code] That is working fine, however, its not doing exactly what I want here is an example of the array i will be using [code]$a = array('b|34', 'b 01|65', 'a 1|435', 'a 31|345', 'a 30|43', 'a 15|345', 'a 10|224', 'a 01|678');[/code] I need that sorting like the function above is doing, but, not to display anything on the right hand side of the | However, once the sort has been completed, I will need the numbers on the right and side of the | for each element thats been sorted. The sort will be echoed as html as a href link you see, and the numbers on the right are ID's of which I need. The text on the left of the | is just the URL text link Hope ive explained that well enough, any ideas?
-
It does seem a bit far fetched, even though it works Are their any alternitive ways to combat this issue?
-
I take it track = Bounce To The Bass 13 variables etc?
-
Take a look at the following data which is displayed in the ASC order [b]Bounce To The Bass 13 Bounce To The Bass 16 Bounce To The Bass 5 Bounce To The Bass 6 Bounce To The Bass 7 Bounce To The Bass 8 NRGetik Beatz Battle Round 1 NRGetik Beatz Battle Round 2[/b] As you can see, it is officially, in ascending order. However, and I think it would be easier to just demonstrate this, I want it ordered/displayed like this [b] Bounce To The Bass 5 Bounce To The Bass 6 Bounce To The Bass 7 Bounce To The Bass 8 Bounce To The Bass 13 Bounce To The Bass 16 NRGetik Beatz Battle Round 1 NRGetik Beatz Battle Round 2[/b] I assume the example is enough clarification. How do I go about this?
-
[quote author=HuggieBear link=topic=112511.msg456710#msg456710 date=1161686494] This is because there's an internal pointer that gets moved on each time a row is accessed. So if you use a while loop to access all the rows, the next time you try to get a row (by creating another while loop) the pointer is at the end of the result set. Try adding this line after the first while loop: [code=php:0]mysql_data_seek($runquerya, 0); [/code] Regards Huggie [/quote] That worked a treat! Thanks!!
-
It still works though... without the literals But the problem explained about happens with or without the ' '
-
Here is my code [code]$querya = "SELECT * FROM `messages` WHERE `TO` = '$User_Session' ORDER BY `DATE` DESC LIMIT 0,10"; $runquerya = mysql_query($querya);[/code] Now, I am using a while loop in conjuction with a mysql array fetch to retrieve the rows, like so.. [code]while ($resultsa = mysql_fetch_array($runquerya)) { echo $resultsa[FROM]; }[/code] That works fine, however, if I then run the same loop again in the same script, it wont work. like so.. [code]while ($resultsb = mysql_fetch_array($runquerya)) { echo $resultsb[FROM]; }[/code] The only way I can get it to work is if I run the same mysql_query() twice but store the results in different variables, likes so.. [code]$querya = "SELECT * FROM `messages` WHERE `TO` = '$User_Session' ORDER BY `DATE` DESC LIMIT 0,10"; $runquerya = mysql_query($querya); $runqueryb = mysql_query($querya);[/code] And then do a mysql_fetch_array for the first, then the second. That works. But obviously Its not the correct way to go around it. Im just wondering why this is happening? Its as if once running a mysql_fetch_array() its emptying out $runquerya meaning it cant be used again? Completely lost... any ideas?
-
Thanks I'll take all the commends into concideration
-
Is it bad to do this [code]$name = $_GET['name'];[/code] Taking into account that name may not always be set basically resulting in a dead variable which basically gives the following error [b]Notice: Undefined variable: ord in /home/jaydio/public_html/search/search.php on line 275[/b] Obviously its only a notice, but is it ok to just turn the error reporting off?
-
Dam!! I didnt realise about the ' ' Thanks !
-
Can you give me an example?
-
Take a look at the below code [code]SELECT * FROM artists WHERE ID IN (1,4,7,21,51) LIMIT 0,5[/code] I'm sure you know what thats doing.. Well, ive just spend an hour trying to get this working.. [code]SELECT * FROM artists WHERE username IN (ste,jeff,peter) LIMIT 0,3[/code] I can only assume the IN() stuff works with numbers only? If not, what am i doin wrong, if so... how can I replicate the function but querying for usernames rather than ID's Thanks
-
For the while to work I have to run the same query twice $runquerya = mysql_query($querya); $runqueryb = mysql_query($querya); And use each in the 2 while loops
-
What other functions can I use, apart from assoc and array They are conflicting with my script esecpaily if in a while loop
-
$x = mysql_query($z); if $x is going to contain 5 rows of info, how can I check to see what the ID field is equal to of each row without doing a mysql_fetch_array/assoc
-
Edit Actually, I think I might know the problem... Once a variable has had the array fetch from it, does that variable then become empty meaning it cant be used again to retrieve the array?