I didn't think this was going to be so tricky. Basically I have two tables in my mysql database (user, comments). Each table has the users id. I simply just want to count how many posts/comments each...
Type: Posts; User: dunlop03
I didn't think this was going to be so tricky. Basically I have two tables in my mysql database (user, comments). Each table has the users id. I simply just want to count how many posts/comments each...
No the table field is of type int(11). Thank you for your suggestions, i'll take note and implement. As for echoing the mysql error, you mean remove the "or die ("Query error")" from the query ?
Sorted it, I had to encase the group ID in double quotes ? I thought you didn't need to do that. Anyone know why ?
I've created a simple comment feature for my website. And I'm using sessions to determine who is in the admin group so they can delete comments.
Group ID 1 = Normal User
Group ID 2 = Admin
...
We'll... I'm not sure to be honest. Im basically just trying to refresh a specific DIV (#content) without reloading the entire page.
Any ideas anyone ? :confused:
Hi Guys,
Im using the code below to refresh the contents of a specific div on my webpage. But the problem I'm having is that when it refreshes it removes the contents completly rather than...
Exactly, you still need to develop for all browsers, regardless of how many uses them.
Ive got s simple css dropdown navigation bar, works fine on all browsers except Internet Explorer. When I load the website it only displays the text links of the navbar, no background image, no drop...
It says line 1, but thats the php tag, weird as hell.
Nobody got any ideas ?
Hi guys, Im getting this error when using php 5.3:
Deprecated: Function ereg_replace() is deprecated in etc.........
When I remove the following section of code from my file the error goes...
You got any sample scripts of this?
Its for the entire site. I just need to set a different number every hour.
Im now using this inside my function, its sets a cookie for one hour:
srand(floor(time() / (60*60)));
...
Im using this code to generate a random number:
<?php
srand ((double) microtime( )*1000000);
$random_number = rand(1000,5000);
echo "$random_number";
?>
The problem is, I want this to...
Ok maybe ive not been clear lol. The "http://mafiahunt.com/test.php" file only contains php, it only has 1 small function in it. So when a user runs the other file i want that file to include the...
Ok heres the actual domain
http://mafiahunt.com/test.php
See if you can get the output of that ;)
Thats all i want is the output :(
But what content are you getting from "http://cowarama.com" I want to get content from a .php file "/test.php"
Basically I dont want a file to run on a users server unless it has a specific file...
I can assure you that the page exists.
Ok, Im using this now:
$f="http://www.test.com/test.php";
$data = file_get_contents($f);
echo $data;
Im not getting any errors with it, but its not...
That doesnt seem to work. I got this error (the url is only an example url for the purpose of this post):
Warning [2] file_get_contents(http://www.test.com/test.php)...
Hi,
I want to include an external php file inside a php file, so if i use a php file on: www.test.com i want to include a file from www.site.com
Ive looked a several methods and cant come up...
Hi,
Im tring to wrap a url in code blocks using the replace method. This is the method im using currently:
$replace = "Replace text here";
$message = preg_replace("#<a href=(.*?)</a>#ims",...
I used the second method and it works perfeclty, thanks alot SambaNeko +1
Hi guys,
Im trying to replace a words that are entered into a settings field (seperated by a ,)
So in my admin panel I enter words in the "hide_words" setting field like so: ...
Ive created a plugin and ive inserted a jquery script in the plugin file, when the user runs the plugin it looks for the file in the jquery script.
The thing is, that this file is not in that...
That may be the case here, but the actuall forum im using allows guests to view the profile page. So the page is publically viewable.
Sry for the late reply.
Ok for example, If i click on one of your usernames here and view your profile page , Im trying to find specific text/string or html element, like so
<img src="image...
Hi guys,
Im thinking of setting my 404 error page to automatically redirect to my websites homepage using .htaccess, like so:
ErrorDocument 404/index.php
Im wondering will this have any...
Yes thats true, but I need to get the text string from "http://www.test.com/member.php" << example url
Im sorry, Im trying to get a specifis string in the rendered out put of , example (http://www.test.com/member.php?)
Yes the page is publically viewable, I wonder is it because the page is php and the rendered content is not actually in the file , its the php thats rendering the information onto the webpage itself ?
Im just trying locate a specific line of text or string on a php page and echo yes if its found and no if its not found.
Here is the error that its displaying:
Thats not the URL, its just an example.
Im using this ti search for specific text in a webpage:
<?php
$link = "http://www.test.com/";
$linkcontents = file_get_contents($link);
$needle = "Hello";
if (strpos($linkcontents,...
Its ok guys, I got it myself:
$link = "http://www.test.com";
$linkcontents = file_get_contents($link);
$needle = "1.0.0";
if (strpos($linkcontents, $needle) == false) {
echo "String not...
Hi guys,
I need a php script that will look for specific text on a webpage. If the text is there it will echo something, if its not there it will echo something else.
Hope someone can come up...
Fantastic, thats what im looking for. Thanks guys :D
Ive tried that, but it only displays "You have the latest version" regardless of the contents of the textfile ?
Im looking for what I thought was a simple function, a script to define a number, lets say 100
I then want it to check a text file, if the text file has 100 in it , it displays "You have latest...