Craig Hopson
-
Posts
212 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Craig Hopson
-
-
hi can some one explain to me what is going on with this code please index.php
<!DOCTYPE html><script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script><script>var data = 'something-here';$.ajax({ type: 'POST', url: 'post.php', data: data});</script>
post.php
<?phpob_start();var_dump($_POST);$data = ob_get_clean();$fp = fopen("textfile.txt", "w");fwrite($fp, $data);fclose($fp);?>
textfile.txt
array(0) {}
why is the $_POST variable empty? and how would i post 2 variables like $_POST['firstname'] and $_POST['lastname']
-
ok i got it working using SESSION just fine but it twitches i think its the javascript when there is no update it starts to move then stops "twitching"lol
<script type="text/javascript">$(function() { setInterval(function() { $("<div/>").hide().load("inc/feedx.php", function() { $(this).prependTo("#foo").slideDown("slow"); }); }, 5000);});</script>
-
oh yes i can do that thanks budAnother option would be the session, you can store the timestamp of the last request there and leave Javascript out of it. -
that's the problem i don't understand javascript AT ALL i dont know why i read the tutorial like 3 times
-
i understand that how do i get javascript to receive the timestame
-
the timestamp is there but how do i do that (Javascript) i can figure out the php
-
ok there is probably a simple way to do this but i cant find it...I would like to auto update from mysql but only new entrys here is what i have index.php
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script><script type="text/javascript">$(function() { setInterval(function() { $("<div/>").hide().load("inc/feedx.php", function() { $(this).prependTo("#foo").slideDown("slow"); }); }, 5000);});</script><div id="foo"></div>$result = mysql_query("SELECT e.*,f.* FROM emails as e left join files as f on f.email_id=e.id WHERE e.subject='1' ORDER BY e.date DESC LIMIT 20");while($row = mysql_fetch_array($result)){//somestuff}
feedx.php
$result = mysql_query("SELECT e.*,f.* FROM emails as e left join files as f on f.email_id=e.id WHERE e.subject='1' ORDER BY e.date DESC LIMIT 1");while($row = mysql_fetch_array($result)){//somestuff}
the code above works BUT it keeps adding the last SQL entry and "not just new ones"
-
i still have had no luck with this... That said windows 8 has not been easy for me a would avoid it for a while till drivers are available I don't think there is a problem with the script i think it maybe windows..
-
Still not updating the tile... Does anyone else use windows 8? could you try it on yours? i think it might me my computer
-
thanks for that i will try it right now and post back with results
-
ok let me give some more information on what i am doing this is the instructions i'm following
ok this would be ok if i didnt have 1000+ entrys so i need the query to show only the lowest id's but not the highest id so i can just delete all this is only a one time problem as i have fixed the bug in the oridgal script Thanksdelete user bugfirst: if you have deleted an user A and another user (or the same user) signs up again with the same username, got to phpMyAdmin --> sql tab and enterSELECT `id`,`uri` FROM `jcow_pages` where `type` = 'u' order by `uri`
by default the listing is limited to the first 30 rows, but you need all the rows.if you have the same uri more than one time, remove the ones with the lowest id.
-
ok thanks i now have this code
SELECT a.id, a.uri, a.typeFROM jcow_pages aINNER JOIN jcow_pages b ON a.uri = b.uriAND a.id < b.idWHERE a.type = 'u'LIMIT 0 , 300
but this is giving me the duplicatse of good entrys any idea why?
-
ok i worked out that this
select `id`,`uri` ,count(*) from `jcow_pages` where `type` = 'u' group by `uri` having count(*) > 1
but this only shows what ones are duplicated and how many times not all the id's of each duplicate
-
i dont know if this is correct or not but it does work i found
<input type=button onClick="location.href='afile.php'" value='SOMETHING'>
-
hi guys i have this query
SELECT `id`,`uri` FROM `jcow_pages` where `type` = 'u' order by `uri`
the problem is it returns 5000+ entrys, I'm looking only for entrys that have the same url (duplicates) but i dont know what the url would be i only want to display url duplicates and i want to be able to do it in phpmyadmin SQL tab Thanks
-
I have the meta tags in the script
-
Maybe I don't know that's why I posted here for help!!!Or your script is doing just what you told it to, but you told it to do the wrong thing. -
Feel free to try the script at http://chsites.co.uk/test.php I haven't done any debugging cos I don't see any errors in my script (above) and I there are no errors in my script then it must be a windows problem?????
-
That may be the problem then can you repost the script and ill up date it on my server http://chsites.co.uk/test.php
-
-
This is what I was following http://msdn.microsoft.com/en-gb/library/ie/hh880842(v=vs.85).aspx basically if you put meta tages on your site with a polling URL then windows will check your site for updates every 30min looking for XML output I just wanted to test it to see if it would work so I wrote the script above to test it but it didn't work so I post here
-
I can't get it to update on the tile but saying that I tried the Microsoft demo tile and that don't work either so maybe it windows problem
-
the problem my be you have closed the form tag before the form has ended
<form method="post" action="http://www.mysite.com/sendquote.php"></form>
- 1
-
Hi guys I have been playing with the new windows 8 metro system and tiles i created this test file but cant get it to work as anyone had any dealings with this
<?phpif($_GET['id'] == ''){?><!DOCTYPE html><html><head> <meta charset="utf-8" /> <META name="msapplication-badge" content="frequency=30; polling-uri=http://chsites.co.uk/test.php?id=1"/> <title>Test Site</title></head><body> <h1>TwitterRooms</h1> <p>Some content here</p></body></html><?php}else{header("Content-type: text/xml");$xml_output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";$xml_output .= "<badge value="newMessage"/>\n";echo $xml_output;?><?php}
google map API
in JavaScript
Posted
hi guys been using this code
to display a map with a route on it i need to change a few things1......Only have markers where there are GEO locations()2......I want to be able to click the markers or hover and get more information like time (stored in database with $row['latitude'] and $row['longitude'])