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






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







My Hold Function


I'm making a hold function, which calculates time spent working on a job, simply by whether the 'Hold' checkbox is ticked or no. By adding up the times around the hold function, the total time spent can be calculated. There is no longterm storage in PHP tho, so I must use MySQL database to store the stuff. However, if you think about it a little, you realise that the hold times must be able to stack, with no real limit. Does anyone know how I can start to put this together?

P.S. Previously I have queries that select * from database, if I add fields that can hold a LOT of DATES, it'll want to print that stuff with my other useful info. Obviously I could limit my SELECT, but is it possible that data can be stored in the database without it being in an actual field that is usually selected?


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Hold Value
I have a web form to collect player data from team leaders. Each team leader may enter individual data for any ammount of others. Each time the form is submitted I am clearing the field which also clears the team leader's name. What I want is a way of holding the initial field (team leaders name) whilst in session. I think I can do this with a php variable. Cant quite grasp the syntax.

On submit I intend sending the data to my email address and to a mysql database. Whats a simple way for me to get the mysql database to email me a csv file from the database? Can I do this with PHP code from the website.

View Replies !   View Related
Hold A Var Over Many Pages
As the title says i am looking to hold a variable over about 15 pages. many people i have talked to say to use the ?some=crap+here method but after the 15th page i should have about 40 vars on the end of that url and that just seems to weird to me. I also dont want to have to set up something like having a random number for each person and then that creates a file for them. So is there any reasonable way of doing this?

View Replies !   View Related
How Much Can A Database Hold?
I'm making a website that has a form on it. People fill in the form by entering their personal details (name, address etc) and by answering some questions. When people submit their information, a new row is created in a mysql database stored on the website web space to store their information.

I would like to know if there is a limit to how many people can register, or how much information the table can hold. For example, if thousands of people join, will it always keep adding rows to accommodate this?

View Replies !   View Related
How Many Records Can MYSQL 4.1.14 NT Via TCP/IP Can Hold?
how many records can MYSQL 4.1.14 NT via TCP/IP can hold?

how many records per table can MYSQL 4.1.14 NT via TCP/IP can hold?

how many records in a table can MYSQL 4.1.14 NT via TCP/IP can hold given the table has a field Primary key - BIGINT(20) autoincrement?

need your opinion..Here are the facts:

MY system is an internal one. My Server--Is only a Desktop.. Celeron 2.8 Gigahertz, 40Gig Baracuda HD, 512 MB memory.. And it serves an average of 20 users a day and it also serves me for my system development..The average records inserted per month on mYSQL is 10,000 records..We foresee that system would be used for about 10 years.

View Replies !   View Related
Code To Hold Marker
I have a small site written in PHP I'm getting a lot of complaints from my users that when they use the back button on there browser that it doesn't take them to the same spot on the page. It takes them back to the top of the page then they have to scroll down and find where they where at. How do I solve this issue is there some code to hold a marker or tag? or would this even be handled with PHP.

View Replies !   View Related
How Many Folders Can Apache Hold
how many folders can apache hold in one directory ? Im useing linux. It didnt occur to me untill now, im writeing a script that uploads files and gives a user a link to download it, and each file is stored in its own folder with a unique ID. But now its occured to me that this may become a problem in the future.

View Replies !   View Related
Getting Option Values To Hold
The following menu sends a url variable which the query below filters on, for updating a record. My question is: how can I make the option value ‘hold’ after it is selected and beign passed to url? Code:

View Replies !   View Related
Hold A Cookie After The Pop Up Window Is Closed?
I have create an href to an html page where when you click a pop-up window appears.This window is used to login in a mysql database.I use a cookie to hold the login name.When the registration completes the window closes automatically.

Unfortunately after the window is closed the cookie disappears and so i cann't hold the login name in order to use it in other applications.Isn't it possible to hold a cookie after the pop up window is closed?If it is how can i do it?

View Replies !   View Related
Create One Array That Will Hold Numbers From 3 To 50
How to create one array that will hold numbers from 3 to 50, their
square roots, and number * 10?

example: 3, 1.43, 30
4, 2, 40

View Replies !   View Related
How Many Records Will A MySql Database Hold?
how many records will a MySql database hold?

View Replies !   View Related
How Much Data Can 1 Session Variable Hold?
I was wondering if it's alrite to store a whole page in one session variable..

<?

session_start();

$_SESSION['page'] = <<<HTML

//web page source code here.. and $variables are insterted accordingly

HTML;
?>

After above page, my other pages can call the session variable and echo it !! no need to keep pre formatting etc etc in html.. also started using this method for tables that i keep recalling.

View Replies !   View Related
MySQL: How Many Tables Can One Database Hold?
Can anyone tell my what the maximum number of tables a MySQL database can hold?

View Replies !   View Related
Hold Untill Fully Loaded
i have a musicplayer but how can i prevent the player from playing untill the mp3 file is fully loaded (or halfway loaded) this is the normal, easy code i'm using : Code:

View Replies !   View Related
How To Hold The Username In A Session Through Out All Pages.
how to hold the Username in a session through out all pages. Code:

View Replies !   View Related
Array To Hold Multiple File Content
I have numerous files that look like the chunk below. From the date and
time I calculate a year day value. For the example that value is
148.67721064815

I'm not an expert yet at dealing with arrays, but I get around well in
php otherwise (reading data files, loops, functions, etc).

My question is how would I go about creating an array that would hold
the year day as a key and the entire file contents in the next element?
Then when I advance to the next file do the same thing so that my ending
array would come out something like this;

View Replies !   View Related
Using Sessions To Hold User Data Once They Are Logged In.
I am writing my first CMS from scratch and am using sessions to hold user data once they are logged in.  The problem is that the session data is not retained unless a username and password is passed through the URL.  For example, if I go to index.php no session data is loaded, but if I go to index.php?username=this&password=that then the session data is loaded.  But passing this through the URL sort of defeats the purpose of having sessions.  So how do I set the session variables without having data passed through the URL?

I have three functions: login() grabs the user data from the database and loads it all into session variables; authenticate() sees if the user is logged in and returns the appropriate boolean; and display_session() displays all of the session data.  I have made sure that I only call authenticate() after login() has successfully ran, so the session data set in login() should be reatined for authenticate(). Here is the code:

View Replies !   View Related
Create A Database In MySQL To Hold The Videos
I'm creating a website that will (primarily) have thousands of videos. Rather than using a template to create a new HTML page for each new video(i.e. to avoid having to create thousands of HTML pages), I want to use PHP so that clicking a particular video link will 1.

open the (one and only) video player page and 2. get the relevant video file. I've configured PHP/MySQL/Apache/phpMyAdmin and have them running smoothly. I'm not sure if we need to create a database in MySQL to hold the videos(and/or their details) or whether PHP code alone will be sufficient.

View Replies !   View Related
Create A Cronjob Which Will Hold A Few Specific If Statements
im trying to create a cronjob which will hold a few specific if statements and do specific functions every ten minutes. What im trying to do is make the if statement to check that a specific resource is over 12 and if it is, it would equal 12. I want to make it check every row so that every user will be calculated easily.

View Replies !   View Related
Phpmyadmin - Make One Of My Field Able To Hold Decimals From 0.1 To 5
I want to make one of my field able to hold decimals from 0.1 to 5. For example 3.75, 4.7 etc. I put it as decimal but I dont know what values i must put for it to work.

View Replies !   View Related
Can Session Variable Hold Objects That Can Later Be Reference By Other Pages?
can session variable hold objects that can later be reference by other
pages? if so, i get an "incomplete object" error when i try to call
methods from the object I have stored in the session.

View Replies !   View Related
PHP 404 Document's REQUEST_URI Does Not Hold Expected Value In $_ENV And $_SERVER
I wanted to migrate some custom 404 error pages from shtml to php for the ease of email notification of lost pages. However when PHP processes the page $_ENV['REQUEST_URI'] and $_SERVER['REQUEST_URI'] both now hold the error page eg "404.php".

Does anyone have advice on how to dodge this? Should I just continue to use shtml error pages and
do an shtml include on a little php script to do the mail?

View Replies !   View Related
MySQL Query - Sub Categories Fields Cannot Hold Products
I have a mysql table named categories which has these fields:

table name: categories
Fields in table categories: category_id, category_name, parent_id

The above tables builds a tree menu with sub categories, parent, child, like a recursive function, which will be placed as menu.

Now I have another table named products which has these fields:

table name: products
Fields in products: product_id, category_id, product_name

The category which holds sub categories cannot hold products and vice versa: Code:

View Replies !   View Related
Code Is Secure Enough To Hold Of The Majority Of Session Fixation And Session Hijacking Attempts.
I am having a few problems dealing with the aspects of security on php pages, having read several books and looked at several web pages about it I am still having a few problems bringing it all together or finding a practical example...

the following is what I am using, and would be very grateful if someone with the knowledge of such things could look at what I have used and tell me if the code is secure enough to hold of the majority of session fixation and session hijacking attempts. Code:

View Replies !   View Related
Using MS Access To Hold The Data And PHP To Collect The Data From The Database
I am using MS Access to hold the data and PHP to collect the data from the database and display it on a website. I've got the results displaying in the normal way with data being displayed in a linear manner e.g. Code:

View Replies !   View Related
Function Inside An Echo - Function Outputs In Wrong Place?
Why does the function evaluate at the beginning?
Can I prevent this so it outputs in the order in the intended sequence in the echo? PHP Code:

View Replies !   View Related
Recover The Agrument Names Passed To A Function Inside That Function? Possible?
Is it possible to recover the agrument names of the arguments passed to a function inside that same function?

example :

blabla($hehe, $huhu, $hihi);

function blabla($a, $b, $c)
{
arg_name($a) = "hehe";
arg_name($b) = "huhu";
// ...
}

Is this possible (agr_name is an imaginary fn)

View Replies !   View Related
Function Inside A Class Function Dont Pass Variables...
Im using xajax class, and i just made a custom class called mantenimientos that use objects of this xajax class. Something like this:

class mantenimiento
{
  public $titulo;
  public $ajax_sRequestURL;

  function __construct($titulo,$ajax_url){
    $this->titulo = $titulo;
    $this->ajax_sRequestURL = $ajax_url;
  }
  function exec_ajax(){
    //Here i can use $this with no problem
    $xajax = new xajax($this->ajax_sRequestURL);
    $xajax->registerFunction("call_fun");
    //I have to do this to have acces to the class itself when im inside a function
    global $mant ;
    $mant = $this;
    function call_fun(){
      //next line give me access to the mantenimiento class properties.
      //I havent    found other way of doing it.
      global $mant;
      $objResponse = new xajaxResponse();
      $objResponse->addAlert('XAJAX CALLED:'.$mant->titulo);
      return $objResponse->getXML();
  }
  $xajax->processRequests();
}

My problem is that $mant->titulo lost it value when i im inside the funciton, but only when that value comes from other var.

for example:

if i do this:

$mant = new mantenimiento('This is the title','index.php');
or
$titulo = 'This is the title'
$mant = new mantenimiento($titulo,'index.php');


When i execute the xajax_call_fun, it shows an alert box with the text "XAJAX CALLED:This is the title"

but if i do something like this:

$titulo = gettitulo_from_database();
or
$titulo = $_POST['titulo'];

The alert box show the mensaje with out the value of the $mant->titulo

Im getting crazy with this....!

View Replies !   View Related
Passing Variable To A Function - Value Is Not Accessed Inside The Function
i am extracting a data from the url. www.somesite.com/somefile.php?usrname=hello
i had extracted hello from this url by using $var=$_GET['usrname']; i passed this $var as a parameter in a function $var.But that value alone is not accessed inside the function why?

View Replies !   View Related
Install The Function Or Enable The Function File_get_contents()?
I have installed the latest version of PHP on my Windows machine
(running Keyfocus web server). How (in simple steps) can I install the
function or enable the function file_get_contents()?

View Replies !   View Related
Function/Global Var To Return Name Of Calling Function?
I'm sure I saw this somewhere but can't remember where and can't find it now...

Is there a PHP function or global variable that will return name of the calling function? I want to do this for error reporting purposes without
having to hardcode the function name into my scripts.

Say the function is named getFunctionName(). I want to do something like...

function foo() {

View Replies !   View Related
Function To Automatically Take/select All Arguments In A Function ?
Is there a function to automatically take/select all arguments in a function ?

View Replies !   View Related
Is There A Function In Php Similar To Javascript's SetTimeout Function ?
Is there a function in php similar to javascript's setTimeout function ?

View Replies !   View Related
Validate Using Strlen Function Or Isset Function
I have a script that works when I do this: ........

View Replies !   View Related
Array Function Or String Function To Compare?
Ok Say I have two arrays:

array1('Bill, Gates, Microsoft, Seattle, USA');
array2('Microsoft,Seattle, USA', 'Microsoft, Washington, USA');

I need to match a portion of array 1 which is: Microsoft,Seattle,USA with array2.

Is there a function that can compare this and return true if a portion of array 1 is in array 2? In this case we find 'Microsoft,Seattle,USA' in array 1 and array 2.

View Replies !   View Related
Address Of Function Or A Virtual Function
Is there some way to implement something like a virtual function or
have something like a user defined function ? One solution I thought
might work: store a reference (address) of a function in a variable
and call it later if that variable has been set ? This seems to
compile OK, but produces funny results. Is this outside the scope of
php ?

function testfn()
{
....
return $result;
}

$myfn = &testfn; // set it too the address of the function
....
if (isset($myfn))
$result = @$myfn(); // call my function

View Replies !   View Related
Any Function That Works Like Function() But Without GLOBALS?
I could really use something like that. The globals problem really annoys me (I don't want to define all my variables as globals in every single function). I just need to call big chunks of code when I need them.

View Replies !   View Related
Variable Scope - Function In Function
Here's something that I can't manage to find explicitly documented. In the
following snippet:

function outer() {
global $a;
function inner() {
global $a;
echo $a.&#391;<br>'
}
$a = 's'
inner();
echo $a.&#392;<br>'

}
outer();
?>

If either of the globals statements is removed, the variable is not
accessable within inner.

View Replies !   View Related
Call Function Inside Another Function
I have a function that gives me the difference between 2 dates. I also have another function which compares a couple things and uses the first function. How do I call one function from within another. Here are the 2 functions. Code:

View Replies !   View Related
Calling A Function From A Function In The Same Class
im trying to call another function from inside another function, pretty simple really. Ive worked with PHP for like 2 years but that was a long time ago and ive forgotten loads, Code:

View Replies !   View Related
Function Inside Of Custom Function...?
I was wondering if it is possible to to have a function inside of a custom created function? Code:

View Replies !   View Related
OOP Call A Function From Wtihin A Function?
I've been working on this (simple) MySQL class. It's gone well so far, but I can't seem to call a function from within a function inside the class.

I want to be able to call the safeSQL function inside the executeQuery function, so that everytime I run a query it automatically checks to make sure the "SQL" is "safe".

However, whenever I try to do that, I get this error:

Fatal error: Call to undefined function safeSQL() on line 53

Can't you call a function from within a function in a PHP class?

View Replies !   View Related
Mail() Function - Using The Mail() Function To Send Emails To Members Of A Website
I am using the mail() function to send emails to members of a website. For some reason when I include words such as "free" or "winner" the mail does not send to any of the addresses - it just seems to disappear in space. I figured this out by trial and error - once I removed those words, it worked. I am running cPanel on the server and have no problem sending emails as long as they don't use those words. It seems to be blocking certain words - ones that I assume spammers would use.

View Replies !   View Related
Update Array Within Recursive Function Passed By Ref To Recursive Function - How?
I'm writing a recursive function which iterates through a data array containing indexed and associative arrays. When an associative array of the form ['name->i,'value'->j] meets certain criteria I want to add an additional key/val pair to the array ('insert'->1). Code:

View Replies !   View Related
Getting The Function Name Of The Calling Function How?
I guess the Subject is a little ambiguos. I want to get the function
name which calls the target function.
Like
function xxx()
{
....
....
yyy(2,3);
function zzz()
{
....
yyy(5,6);
.....
function yyy($a,$ab)
{
...
...
echo "yyy() has been called by the function - ".$functionname;
Now how can I get the name of the function tat calls yyy()....

View Replies !   View Related
Put My Function As Default Function?
I have a function foo(), I want all my page can call this method
without include / require

I know I can set in php.ini by setting the auto_prepend...

but this will cause overhead as every file need to prepend this file
even no call to the function,

are there any better method?

instead of writting an extension?

View Replies !   View Related
Function Inside A Function
I have encounter errors on functions inside functions this is what I write. PHP Code:

View Replies !   View Related
Call Function From Within A Function (oop)
I've been working on this (simple) MySQL class. It's gone well so far, but I can't seem to call a function from within a function inside the class.

I want to be able to call the safeSQL function inside the executeQuery function, so that everytime I run a query it automatically checks to make sure the "SQL" is "safe".

However, whenever I try to do that, I get this error:

Fatal error: Call to undefined function safeSQL() on line 53
Can't you call a function from within a function in a PHP class?

View Replies !   View Related
Pass Function To Function
I'd like to write a function like:

function f(){ ... bla ...}
f_example(f);

function f_example($function_to_execute)
{...bla... $function_to_execute() ...bla....}

AND how to pass the variable of the function :

function f_example($function_to_execute($var1,$var2))
{...bla... $function_to_execute() ...bla....}

View Replies !   View Related
Call A Function Within Another Function?
How to call a function within another function?

function a($name)
{
   //some code
}

function b()
{
   $n = $a('Jack');
   //some code
}

View Replies !   View Related
Function To Trigger A Function?
I've been writing a blog system for a whiler now, I've just gout round to adding in the ability to add comments to a blog entry.

I'm trying to display the number of comments for a particular entry, and so far the only way I can do this is to have the following lines of code repoeted after each "do, while".
I've currently go the blog page to spit out the following Code:

View Replies !   View Related
Function Inside A Function
I have a class a little like this: PHP Code:

class test
{
  function testingthis()
  {
    return "this";
    function testingthat()
    {
      return "that";
    }
  }
}
$test = new test;
$this = $test->testingthis();
$that = $test->testingthat();

View Replies !   View Related
PHP Warning: Mysql_connect() [<a Href='function.mysql-connect'>function.mysql-connect</a>]
I am getting the following error

PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections in /usr/share/pear/adodb/drivers/adodb-mysql.inc.php on line 340

Can anyone tell me the possible reasons for this.

View Replies !   View Related

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