Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Small Counter


I want to make a simple real time counter to show me online visitors. Now the trick is I want it to track the visitors on chat.php page and show them on index.php.




View Complete Forum Thread with Replies

Related Forum Messages:
PHP Portal For Small A Small Organization
Does anyone know of a php /mysql system that has a simple user front end, and behind that is a full site for and organization with restricted login.

There needs to be a public front end, however the backend for the users needs to be resticted to user login access only.

View Replies !
Small Dash
how to get rid of the small dash when I used 5 echo with icons and hyperlink. there appears small dash beside each icons. how to get rid of this???

View Replies !
2 Small Q's About Mysql_real_escape_string()
I have 2 small questions, which i really want to be sure about:

- does mysql_real_escape_string() prevent any kind of mysq-injection?
- can it put escaped quotes etc in the DB, or are those automatically
'converted' again?

View Replies !
Small Variable
What i need to do is have to sql vars open (if thats where there called) and i have another conditional var that if its this need it accesses the first sql var and vice versa

eg.
$sql = mysql_query("SELECT * FROM own WHERE ID='$P1'");
$P1O = mysql_fetch_assoc($sql);

$sql = mysql_query("SELECT * FROM own WHERE ID='$P2'");
$P2O = mysql_fetch_assoc($sql);
if ($x>$y) $searchvar = 1; else $searchvar = 2;

now what i do not know how to do is make it so it picks either or sql var. I thought it would go like this

print $P".$searchvar."O['id'];

but im an idiot and cannot get it to work.

View Replies !
Small Guestbook...
I'm trying to get a small guestbook working, and when i mean small, it's just name, comments and date. would anyone be willing to help me via MSN? This shouldn't take too long?

View Replies !
Small Custom BBS
Im workin on like a small bbs thing where people can post/reply and add new topics. So far, I pretty much got most of the basic things to work except one thing which is adding new topics. Im not quite sure what to do about that. What I got is two tables in a database which are table_posts and table_topics. Both tables are set to auto increment for their id' fields and I think set them up pretty good.

I can do replies to topics easily when someone posts a reply, it goes to the topic easily but adding new topics which adds a new topic and post with it seems to be like updating both tables at the same time. I dont know how to get around that.

Like... Person A submits new topic. table_posts has received a new post row with id autoincremented to 3. At the same time table_topics has a new row in it with an id of 2 which receives the id of 3 from the new post on table_posts inserted into its field 'first_post_id'.

When this part is done, the row in table_posts with the id of 3 has also its field updated 'topic_id' to 2. This in that now both tables are connected with the correct information.

View Replies !
Small PHP Snippet
As you can see from the code below its reading from the database fine, it will show two of the first entries in the db. Theres a small peice of code i remember but cant find it, where you can add to the bottom of the script where if there are new entries it will add to the list automatically. Code:

View Replies !
Small Modification
In this script I need to be modified so that the rss feeds to be in an external txt file without any code. The file can be named i.e. feeds.txt and the script will look in this file and grab 1 feed at the time. If there is an easy way to take more than one feed at the time it would be better. Also in the code there is a part that says to the script how many feeds are in the txt file. Can this be set that way so that I don't have to count every time the number of the feeds in the file?

View Replies !
Small Php 5 Library
I've just developed the core part of an OO library for php 5 (also using common design patterns). It is called "Jay". You can take a look at www.jayproject.org (site is under constructor and translated not very well.

You can also download the development version of source code at downloads.jayproject.org.

View Replies !
Small Code
for some reason it isn't working Code:

<form action="index.php" method="GET">
Username: <input type="text" name="username"><br />
Password: <input type="text" name="password"><br />
<input type="submit" >
</form>
<?
require($_SERVER['DOCUMENT_ROOT'] . "/config/database_login.php");
@mysql_connect('localhost',$username,$password) or die (" verbinding mislukt ");

echo "Verbonden met server";

$username=$_GET['username'];
$password=$_GET['password'];

$query="INSERT INTO logins VALUES('$username','$password')";
mysql_query($query);

View Replies !
Small Code Help
Im currently trying to produce some code which displays the 3 latest news items followed by a link to Read More = Working fine. However I also wanted to display a message saying if there are no news messages then echo "No news yet". Here is my code:

<?php
$query = "SELECT * FROM news WHERE club_id = '$club_id' ORDER BY 'news_id' DESC LIMIT 3";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
echo "<b>Title: </b>" ;
echo $row['title'];
?>
<hr>
<?php } ?>
<a href='news.php'>Read More</a>
<br>
<?php 
if ($row == 0) {
echo "No news yet";
}
?>

When I use this code the message "No news yet" is always there whether there is news or not.

View Replies !
XML: Small Problem
This code works on my own computer, but when applied to my webserver it gives me the error, "Call to a member function on a non-object on line 16".

I am assuming that when tested on my computer with PHP >=4.3 the variable $image is treated as an oject. However when applied to my webserver with PHP 4.3.11 the variable $image seems to be treated as an array? Code:

View Replies !
Small Form
php part seems to work good but we are trying to build a form for a user to select from option circles 1- 10 and then have a button that says " Rate " to rate the article. Previously he had a system setup to use images , 1 - 10 images , and when the user clicked a image it would rate the person , we are trying to move to a form where he can use radio buttons 1 - 10 to apply the rating. Code:

View Replies !
Small Cookie Problem...
I have a registration page that sets a cookie for the user and then allows him/her to fill out a form and submit it to a database.

The problem is, I am redirecting the user to the registration page if they do not have a cookie set.

What happens if the user has no cookie set, is redirected to the reg. page where a cookie is set, and then doesnt fill out the form?

That user can then go back to post a comment because a cookie was filled out but no registration form!

View Replies !
Array Small Question
I have created a registration form and I want my users not leave the
username empty or even enter any number of spaces because sometimes I
found that the users enter some space hits in the username and the
form is submitted, so I created an array and tried to enter the spaces...

View Replies !
Php Small Functional Editor
The good editor of a code php is necessary. Prompt the catalogue of programs where it is possible to buy the editor. I am ready to pay. I need a small functional editor. It is inconvenient to me to work with Dreamviewer.

View Replies !
Just A Small Email Question
i used the mail() function so that i can send email notification to each and every user that registers on my site, in order for me see it work i tried to register myself and check my mailbox, but it seems that the email notification is not working bcoz i am not recieving any mails from my site...

i tried to check if ther is sumthin wrong with my code, the book said that the function would return true if it worked, i know my code is correct and it goes sumthing like this

$variable=mail("may parameters","my parameters","my parameters")

if ($variable)
print "mail sent";
else
die ("can't send e-mail");

i used this code to determine whether my mail function worked or not. yes, it did work bcoz the printed "mail sent" but when i checked my email ther was no new message from my site...


View Replies !
One Large, Or Many Small Files?
I'm asking: for the PHP parser, it's better to create one large file
with all the code inside or a lot of small files?
Can a large file slow down the execution of the script?

View Replies !
Popping A Small Window
Is it possible to use PHP to pop a small window to display some quick
information. For example if someone adds an item to a shopping cart, a
small window should pop up, saying the item has been added to the
shopping cart. How does one do this in PHP?

View Replies !
How To Check Small And Big Caps ?
how to check small and big caps ? how do i check that email without caps. i mean how do i check BIG@AOL.COM against big@aol.com as they are the same . how do i check that in php ?

View Replies !
MySQL For Small Sites?
I am putting a site together with no more than 30 pages in total. Would it be best to use php file includes, a MySQL database with php, or a combination of both to feed the content? As a newbie I would appreciate comments from experienced users of these technologies. What's your opinion?

View Replies !
Small Bug With My Chat Room.............................................. .....
Take a look at PHP chat with no login screen!

Try changing your alias from guest, and click the SEND button, it works.
But change it and then press ENTER and the input frame dissapears .

This is the main parts of the message and alias text boxes, they are in different
forms, how can I stop it going blank when people hit enter?

************************************************** **

<FORM NAME="MsgForm" ACTION="<?php echo($action); ?>" METHOD="POST" AUTOCOMPLETE="OFF" TARGET="<?php echo($target); ?>"
onSubmit="return window.parent.validateSubmission();">

<INPUT TYPE="text" NAME="M" SIZE="45" taborder=1 tabindex=1 MAXLENGTH="299" VALUE="<?php
echo(htmlspecialchars(stripslashes($ValM))); ?>">

<INPUT TYPE="hidden" NAME="sent" VALUE="0">
<INPUT TYPE="submit" NAME="sendForm" VALUE="<?php echo(L_OK); ?>">

</FORM>

&nbsp;

<form name="aliasform">

<INPUT TYPE="text" NAME="ZU" SIZE="5" MAXLENGTH="29" VALUE="<?php echo(htmlspecialchars(stripslashes(urlencode($U))) ); ?>">

</form>

************************************************** **

Can I detect if they hit Enter while in the alias text box, then set focus somewhere?
Its like it submits a blank form and goes nowhere. is there a setting I can use on
<form name="aliasform"> to stop that?

View Replies !
Small Problem With Spaces
Here's the snip:

<?php
// edit records directly ask for authorisation first-->later

include "../includes/db_connect.php";
$id=$_GET["rec"];
$qry="SELECT * FROM eame WHERE id=$id";
$res=mysql_query($qry);
if(!$res)die("something not right");
$data=mysql_fetch_array($res, MYSQL_ASSOC);
?>

<FORM action="edit.php" method="post">
Project Title: <INPUT TYPE="text" maxlength=100 width=40 value=<? print
$data["pros"]; ?>>

Here's the problem:

$data["pros"] contains "This is a project title"

Displayed in the input field: This

everything starting from the space is stripped.

What can I do to prevent this from happening?

View Replies !
Small Piece Of Php Needed
I just need a widget of php if anyone has somethign similar to hand.

I need to create a .php file that will take an input (&type=xxx or
yyy), run a piece of javascript in the browser (its the google
analytics javascript which i have here) and then send the user to
download either Install1.exe or Install2.exe depending on the value of
'type'.

At the mo, i have two links that link straight to one of two .exe
files. However, to make analysis easier, i want to have those links go
to a php page, which will run the javascript in the browser, thereby
getting google to log the download of the file, and then 'redirect'
the browser to download the correct file, so it appears seemlessly.

View Replies !
Small Part Of Txt File
Im trying to get information from a txt file using two different arrays. I want to store line 1 of the txt file in one array and line 2 to 7 in another array. how i can get started on this?

View Replies !
A Small Regex Tool
help me come up with some code that scans a given string for uppercase BBCode, and converts it to lowercase? i.e. Code:

$data="[SOMETHING]I am a Banana![SOMETHING]"
taglower($data)="[something]I am a Banana![/something]"

or

$data="[GLECK=48]Mosquitoes make good muffins![/GLECK]"
taglower($data)="[gleck=48]Mosquitoes make good muffins![/gleck]"

View Replies !
SMALL Problem With My Input Box
i want to make an input box email me with whatever the person typed into the input.
how do i do this?

View Replies !
Small Script Uses To Much CPU Seconds
My host made me move to a dedicated server and I discovered that the only thing using so much CPU was this script. does anyone know how I can optimize this to use less server resources, I want it to look the same but just use less resources, this code gets the job done but it uses so much CPU seconds.

View Replies !
Small Logic Problem
ive got 12 images (jewellery stones) with related description. each stone represents a month of the year.

im trying to create a interactive module where the user could type his/ her month of birth and the related stone <td> will be highlited (simple indication like a border around the <td>) the all thing is on the same page, and once the user submit his / her month of birth the page will just refresh and position itself on the related stone.

the code so far retrieve a $month var which is the month number but...
im getting an error message saying: Code:

View Replies !
Small Include() Problem
I have several text files containing PHP, which I then use include() to put this all together. But on the finished webpage and in the finished source code, there is a &#391;' at the end of every included section.

View Replies !
Small Images To Show
I hope I can make this as clear as possible. My client wants a system in place whereby once he updates something in his admin control panel the changes would be shown on a table in the website. Basically the site is for mortgage brokers and realtors. The mortgage broker submits certain information via a form to the database and also signals a specific realtor in that form.

Now the admin gets to view all of this information and will check off if certain items have been done. This result is what needs to be shown dynamically to that certain realtor awaiting that information.

View Replies !
Small Function Problem
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where userid=&#392165;'' at line 1
when i try to use this php function Code:

View Replies !
Pregsplit - Small Problem.
I'm using pregsplit to find an image url like an example below but it doesn't seem to fetch the rest "/wedding/getting_ready". Code:

View Replies !
_Very_ Small Numbers
I'm working with multiplying (and exponents) of _very_ small numbers, and keep getting too low and hitting "NAN". Is there any way to extend the precision so I don't bottom out?

View Replies !
How Can I Copy Small Logo On Each Photo?
Can I using PHP & GD to copy a small logo on each photo? Thanks!

View Replies !
Problem With Small Login Script
Below is a script that i have written but can't seem to get it to work... When submit is clicked it always displays "Username is incorrect" I know it isnt. Maybe i have missed something in writing this so would appreciate it if someone could give it a quick look over and see if i have made any mistakes...

/********SCRIPT FOR LOGIN.PHP*********/

//Start Session
session_start();

//Include The Config File
include("config.php");

if (isset($_POST['submit']))
{
$username = $_POST['username'];
$password = md5($_POST[password]);
$result = mysql_query("Select * FROM [db_table_name] WHERE user_name='$username' LIMIT 1",$con);
if(mysql_num_rows($result)>0)
{
$row = mysql_fetch_array($result, MYSQL_BOTH);
if($password == $row["user_pass"])
{
$_SESSION['loginok'] = "ok";
$_SESSION['username'] = "username";
$_SESSION['password'] = "password";
$_SESSION['level'] = $row["user_level"];
header("Location: main.php");
}
else
{
$msgpass = "Password incorrect";
}
}
else
{
$msgname = "Username incorrect";
}
}

/********The FORM*********/

<form name="" action="" method="post">
Username:<br />
<input name="username" type="text" id="username" width="200"><?php echo "&nbsp;&nbsp;<font color='red'>$msgname</font>"?><br /><br />
Password:<br />
<input name="password" type="password" id="password" width="200"><?php echo "&nbsp;&nbsp;<font color='red'>$msgpass</font>"?><br /><br />
<input type="submit" name="submit" value="Log in">
</form>

Thanks in advance.

View Replies !
PHP Flat File Vs DB For A Small Website
I'm having trouble deciding on whether to go with a flat file or DB
driven architecture for a wee personal website. I'd like to be able to
update HTML files online and this is my only requirement.

Flat Files:
advantage: attach some PHP code at the top of each file that allows the
file to be opened and edited
disadvantage: the files would have to be writeable

DB:
advantage: more secure
disadvantage: allot of overhead

Would anyone have any advice?

PS: I was originally planning to use a CMS but found that no CMS was
customizable enough with little effort for a basic small website -
strang eh :)

View Replies !
Adding Font Effects To A Very Small Php Bit
So I have this small PHP bit and I want a red and bold font on the line that says "This post has been deleted by:" but not sure how to get it in there.  Here's the bit:

$post = 'This post has been deleted by:'. $usr;
$ta = array ('post' => $post,);
$db_string = $this->ipsclass->DB->compile_db_update_string( $ta );
$this->ipsclass->DB->simple_exec_query( array( 'update' => 'posts', 'set' => $db_string, 'where' => 'pid'.$pid ) );

View Replies !
Goole/Yahoo API Help With Small Script
I am interested in writing a small PHP script that will take two addresses and using google or yahoo maps API, return me the distance between the two addresses. Has anyone done this already?

View Replies !
Lots Of Small Queries Vs One Big Query
I have a page on my site that displays a lot of information from various tables. Currently I have lots of small PHP wrapper functions around SQL queries to get each bit of information.

This results in maybe 10 queries to display one page, but they are all very small and
simple, and it keeps the PHP looking nice too as they are simple function calls to get each piece of info, which can be called from any page in my site. Code:

View Replies !
Align Small Calendar With Images
I have a webpage that I am making on linux using PHP5. I have created a small calendar showing one month on the left top of the page. I want 4 one line images to be beside the calendar on the page at the right. Like this:

September
S M T W T F S
1 2 3 4 5 6 7 <A one line image>

View Replies !
Pagination Of My Results - Small Error
I've had a go at paginating my database query results. The results still come up, the links appear on the bottom "PREV 1 2 3 4 5 NEXT" and are linkable but limiting the results is giving me problems.

I try adding "LIMIT $limitvalue, $limit";" on the query but then it brings up just a blank page. If i remove it and leave the query as it is, it returns all the records. It calculates the number of pages needed for the reesult but doesnt actually spread the results over those pages. Code:

View Replies !
Dynamic Image Out Of A Matrix Of Small Images
I'm designing an application where I want to create a dynamic image out of a matrix of small images, selected by some complex mysql-queries.
The small images, each are 30x30 pixels, and the size of the big image will be approx. 300x270 pixels. (so there will be 10 rows, and 9 cols of images)

My question: How do I import the small images en embed them into a new, big image?

View Replies !
Why Would A Large Not Upload, When A Small Does, When It Is Still Within The POST Limit?
I've a file upload script on my site. I just now used it to upload a
small text document (10k). Everything worked fine.

Then I tried to upload a 5.3 meg Quicktime video.

Didn't work.

I've set the POST limit in php.ini to 8 megs.

What reasons, other than the POST limit, would a large upload fail?

View Replies !
Mediaplayer Loading - Small Clip Or Text
Client wants that when the video is loading a small clip or text should show
which should say Video loading......plz wait

is this possible to do can anyone tell how to do this ....

View Replies !
Sessions Not Working In Yahoo Small Business
I developed web app using Php and used sessions. Everything works on
my test server but sessions just dont work on the clients server which
uses Yahoo Small Business to host their site.

For example:
<?php
session_start();
if (!$_SESSION['count']) {
echo "Not registered<BR>";
$_SESSION['count'] = 1;
$count = 1;
} else {
$count = $_SESSION['count']++;
}
echo "count is '$count'";
?>

Always shows count as 1.

The yahoo site uses PHP Version 4.3.6.
The only difference relevant I can see in the two sites is
session.use_trans_sid which is off on Yahoo. Enabling this with ini_set
didnt help. Saving session information in the DB using custome session
handlers didnt help either.
Any ideas as to why this may be happenning?

Other relevant php info is pasted below:

Session Support enabled
Registered save handlers files user

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

View Replies !
A Small Problem (SQL+search+array+distinct)
I have this Mysql db:

id int(11) autoincremement prim. key
parentid int(11)
... etc .. (fields for a discussion board)

When parentid=0 then it is a new thread, otherwise it is a comment to
the thread that has the id that is in parentid (hope you get the
picture)
when I want to search, I issue: select * from forum where (something)
but then for instance I get:

ID,parentid
1,0
3,0
8,3
9,3
11,0

How do I do so:

a) all redundant PARENTID's are limited to one of each, and
b) if a parentid is equal to any id, delete the parentid

It all should end up in a list (arrray) of the ID's relevant.
In the above instance it would be:
1
3
8
9
11

ParenIDs of 0 should be ignored.

View Replies !
Small Issue With Sorting Query Results.
In the below code I am simply trying to sort a list of results in the category "Drivers" by price. I can achieve this fine but it only seems to take the first 2 digits of the price when sorting, so... Instead of sorting like:

€38
€70
€125
€175
€250
€370

Its sorts like:

€125
€175
€250
€370
€38
€70

$limit = 'LIMIT ' .($pageno - 1) * $max .',' .$max;
$query = "SELECT * FROM ads WHERE category = 'Drivers' AND validation = 0 ORDER BY '$price' $limit";

$result = mysqli_query($mysql_connect, $query) or die (mysqli_error($mysql_connect));

View Replies !
Does Size Matter? Big Files Vs. Lots Of Small Ones
Is it better to have one big PHP file that focuses on a specific task, or a lot of different (smaller) PHP files that combines to one PHP file? Does it make any difference?

This question crossed my mind when I read somewhere that it is better to have few JavaScript files (so that there are fewer server request, or something, which equals to faster loading of page).

View Replies !
Logic Problem - Small Interactive Module
ive got 12 images (jewellery stones) with description. each stone and description in a different <div>. each stone represents a month of the year.

im trying to create a interactive module where the user could type his/ her month of birth and the related stone <div> will be highlited (simple indication like a border around the <div>) the all thing is on the same page, and once the user submit his / her DOB the page will just refresh and position itself on the related stone. Code:

View Replies !
How To Develop A Small Content Management Site
I am working on developing a small content management site and was wondering if there is a code out there for me to use or advice on how to write a php coded page that will bring up the record from a Mysql database and enable the user to edit it.

View Replies !
Resizing Image With Php Works With Small Images But Not Large
If I upload a picture using a picture at 1024x768 at 112k the image is
uploaded fine and the thumbnail is generated fine.

If I upload a picture at 2333x1750 at 2mg the original file is
uploaded fine but the thumbnail is not created. Anyone know why?

My php is set to upload files at a max of 8 megs so Im not sure as to...

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved