User Profile

Collapse

Profile Sidebar

Collapse
spudse
spudse
Last Activity: Mar 31 '08, 07:16 AM
Joined: Jan 7 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • spudse
    replied to manipulating text file
    in PHP
    I think the easiest way is to make an assiciative array of all lines in the file. First you have to get the files in a variable, file_get_conten ts() is usefull for this. Then use a regular expression function to get all lines in an array, preg_match_all for instance.

    $line [1995] [1] = (8 June 1995) S v m [tty]xs a; 1995 (3) SA otyttt
    $line [1995] [2] = (8 June 1995) S v m [tty]xs a; 1995 (3) SA otyttt
    ......
    See more | Go to post

    Leave a comment:


  • Ok, I was one google search away from my answer :)

    SQL Server Hosting Toolkit

    Edit: It's really a great tool!
    See more | Go to post

    Leave a comment:


  • Migrating database from development server to hosted server

    Hello,
    I have created a database on my home development server (Microsoft SQL Server 2005 Express). Now I finally found a hoster that fits my needs and I would like to migrate my database to this hosted SQL Server.

    The database contains:
    - Tables
    - Data inside tables
    - Views
    - Stored procedures

    I can connect to this server remotely. However I don't have file access so I can't just restore...
    See more | Go to post

  • spudse
    replied to print tables by php code
    in PHP
    [code=php]
    echo $var; // Results in the value of $var being printed
    echo '$var'; // Results in the word '$var'
    echo "$var"; // Results in the value of $var being printed
    [/code]
    Source

    With doubles quotes (") you can print things like:
    [code=php]
    $name = 'spudse';
    echo "My name is $name";
    [/code]

    With single quotes you need to do...
    See more | Go to post

    Leave a comment:


  • spudse
    replied to manipulating text file
    in PHP
    A small database would be perfect for this. SQLite comes with PHP5 and is quite easy to work with and quick to setup.

    Are you experienced with databases? If not, it's not as hard as it seems.
    See more | Go to post

    Leave a comment:


  • spudse
    replied to php redirect
    in PHP
    You can use the header function for this. No output may be sent before using this function.

    [code=php]<?php
    header('Locatio n: http://www.yourdomain. com/page.asp');
    ?> [/code]
    See more | Go to post

    Leave a comment:


  • spudse
    replied to Working with time zones in php
    in PHP
    I already found this article: Get the correct time by converting between time zones with PHP and PEAR, but it makes use of PEAR and I rather not use pear.

    Does anybody know a pure php solution?
    See more | Go to post

    Leave a comment:


  • spudse
    replied to To get the window name using PHP
    in PHP
    The name of the windows is only available client-side I suppose. PHP can't communicate with a client-side language like Javascript (well it could when you use ajax, but I don't think that is what you are looking for).

    What you could do is add the window name to the url that is used by this window, for instance "http://www.yourdomain. com/window.php?name =theName".

    You can know access this name with:
    [code=php]echo...
    See more | Go to post

    Leave a comment:


  • spudse
    replied to Use PHP to do Line Graph
    in PHP
    Jpgraph is indeed created just to do this. The script you pasted is a Jpgraph script also.

    Jpgraph is a sort of script/library that uses GD library (needs to be installed in php) to create graphs. It comes with a massive load of examples, which you can alter to create into something you like.
    See more | Go to post

    Leave a comment:


  • spudse
    replied to Setting $_SESSION in PHP 5
    in PHP
    You can leave the isset() criteria out, just start every page with

    [code=php] session_start() ; [/code]

    You have to make sure that you that there is no character or space or anything outputted before you use the session_start() function (this will output an error also, about output before the headers have been send).

    Also make sure that your browser accepts cookies (sessions are actually cookies until you...
    See more | Go to post

    Leave a comment:


  • spudse
    started a topic Working with time zones in php
    in PHP

    Working with time zones in php

    I am creating a PHP web application where users can see which events have occured between two input dates. These events and their datetime are stored in a database in UTC timezone.

    The user is able to select the time zone he is in and then the start date en end date. The PHP script then selects all events date occured between those dates.

    The date values submitted by user are:
    01-01-2008 00:00
    05-01-2008...
    See more | Go to post
No activity results to display
Show More
Working...