Jump to content

Paul-D

Members
  • Posts

    117
  • Joined

  • Last visited

Posts posted by Paul-D

  1. No sorry don't understand this. I have opened a text file for reading before.

    I have a table

    CREATE TABLE IF NOT EXISTS `History` (
      `EntryDate` date DEFAULT NULL,
      `Value1` decimal(6,2) NOT NULL DEFAULT '0.00',
      `Value2` decimal(6,2) NOT NULL DEFAULT '0.00'

    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
     

    I create this using PHP myadmin. I can upload a text file to the server

    2020-03-01    8100.7    1212
    2020-03-02    8113.1    1213
    2020-03-03    8126.1    1214

    How am I going to get the database table loaded with this? I do not work locally as I am using a windows stand alone PC and do not have my computer set up with all the PHP and MySQL bells and whistles. I can read the file and break it up into it,s component parts and compile an SQL query and execute it. I can't do it like you do locally and then upload the table. This is how I have to do things.

    The hard way would be to create a exe using microsoft's Visual Studio reading and writing text files and run the resultant text in 
    PHP Myadmin. Very long winded way of doing it.

  2. Hi. I have a large amount of data in an excel spread sheet. I have isolated 3 rows containing a date (yyyy-mm-dd plus two decimal values). I saved this as a tab delimited text instead of a comma separated csv. 

    What I want to do is read each line of a text file and split it up into 3 and construct an INSERT INTO sql. the problem is this is not separated by comas for a split function. Can I split on a tab instead?

    I have used commas in the past only.

    TIA

    Desmond.

     

  3. Yes. On a standard chrome icon. I right click and select properties. I get a window with 6 tabs on 2 rows. Do you see the same?

    What I want is an icon that I can paste a URL into and simply click it to get a web page up. 

    The other icon (can't work out how it happened) has this. When I right click and choose properties I get a different pop up. and on the web document tab, I can paste a URL into it. I don't get Web document with the standard chrome desk top icon

  4. Hi. I have google chrome as a shortcut on my desktop alongside safari firefox and others.Can be useful to see if a web page shows the same in different web browsers. I want a shortcut to a chrome web page dedicated to one particular website page. I have done this again after years but can't remember how I got their.

    On the main icon, when I select properties I have six tabs: Security, Details, Previous versions, General, Shortcut and Compatibility. 

    On the (dedicated shortcut) I have 5 tabs, General, web Document, Security, Details, and Previous versions

     

    How do I create these as I am having to copy and paste to my desktop to get around it.

     

     

  5. Hi. I have been looking at a new and currently well looked at web page. In this there is a picture of a woman in a black flowery dress. When you scroll up and down she stays put and the image is scrolled. Interested in how this is done.

     

    https://www.cornwalllive.com/news/cornwall-news/speedo-mick-finishes-walk-lands-3875753 

  6. No I don't want a web browser. I want a computer operating system. I have a spare SSD 500G drive so I can do this without affecting my current system. I have been to the following web pages in turn and downloaded the following.

    https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/
    https://www.debian.org/CD/
    https://www.debian.org/CD/http-ftp/
    https://www.debian.org/CD/http-ftp/#stable
    https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/ 

    debian-10.2.0-amd64-DVD-1 to -3

    I have a creative labs sound blaster and an Nvida add on graphics card (very new)
     

    UPDATE

    I go to ...
    https://www.oracle.com/solaris/solaris11/downloads/solaris-downloads.html
    https://www.oracle.com/solaris/solaris11/downloads/solaris11-install-downloads.html

    Where do I go from here? I see lots of 32 bit operating systems. No 64 bit.
     

  7. I know that a lot of you php programmers use the Unix based system. I tried this years ago. I even got hold of a DVD I think it was lynx. I installed it and it ran fine. It got to the point where it asked to get updates on the internet. I agreed but that is where it stopped. I believe that it could not get updates for drivers as it need my internet router and my computer (with this new software) did not have drivers for the internet router. That was over 5 years ago. So could you pros tell me how to do this.

     

    Computer speck (I live in the UK)

    M5A78L-M-USB3

    Router is a Talk Talk super fast broad band (1G) modern router.

     

    I would like to seriously go for this now. I know there are some experts here. I do PHP but it is on MICROSOFT WINDOWS

  8. Hi this is not a PHP problem it is a unix/linux problem.I have been going through my banking website and found a folder /#/login

     

    I have never seen # used as a folder. Can someone tell me if I can do this and what symbols are available.

  9. Hi I call a function with values of 51 and 100 but the function receives values 1 and 50

     

    <?php
    // EmilyMoor Version 1.0.0   05-07-2019   Desmond O'Toole.
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
    require("../secure/SecureFunctions.php");
    require("secure/SecureFunctionsEmilyMoor.php");
    $page = "Emily Moor";
    session_start();
    
    $Browser = $_SERVER['HTTP_USER_AGENT'];
    
    if (!isset($_SESSION["PageValue"]))
        $_SESSION["PageValue"] = '1';
    
    $_SESSION["PageValue"] = 2; // Keeps going back to 1
    
    if($_SESSION["PageValue"] == 1)
    {
    	$_SESSION["StartValue"] = 1;
    	$_SESSION["EndValue"] = 50;
    }
    
    if($_SESSION["PageValue"] == 2)
    {
    	$_SESSION["StartValue"] = 51;
    	$_SESSION["EndValue"] = 100;
    }
    
    if($_SESSION["PageValue"] == 3)
    {
    	$_SESSION["StartValue"] = 101;
    	$_SESSION["EndValue"] = 150;
    }
    
    if($_SESSION["PageValue"] == 4)
    {
    	$_SESSION["StartValue"] = 151;
    	$_SESSION["EndValue"] = 200;
    }
    
    if($_SESSION["PageValue"] == 5)
    {
    	$_SESSION["StartValue"] = 201;
    	$_SESSION["EndValue"] = 250;
    }
    
    if($_SESSION["PageValue"] == 6)
    {
    	$_SESSION["StartValue"] = 251;
    	$_SESSION["EndValue"] = 300;
    }
    
    echo $_SESSION["PageValue"] . " - " . $_SESSION["StartValue"] . " - " . $_SESSION["EndValue"] . "<br>";
    
    $qStationDetails = GetChanelInfo($_SESSION["StartValue"],$_SESSION["EndValue"]);
    $rs = mysql_fetch_array($qStationDetails) or die ("E3001-101A");
    $Name = $rs['Description'];
    
    
    ?>
    function GetChanelInfo($StartCH, $EndCH) // E2004
    {
    	echo "Channels = " . $StartCH . " " . $EndCH . "<br>"; // values are 1 and 50
    	$sqlChanelInfo = "SELECT * FROM  TV_EmilyMoor WHERE ID >= $StartCH and ID <= $EndCH";
    	echo $sqlChanelInfo . "<br />";
    	$qChanelInfo = mysql_query($sqlChanelInfo) or die ("E3004-01A");
    	return $qChanelInfo;
    }

     

  10. No that doesn't always work. If websites use Name="Name" for an input form which they do. You can get auto complete to work the wrong way. I don't want to turn off auto complete.

     

    As for 

    To have a variable name value means a headache for your receiving script which has to figure out what to call that specific field when having simple static values is so much easier.

     

        $Comment_Name = $_SESSION['COMMENT_NAME'];
        $Comment = $_POST[$Comment_Name];

     

  11. ginerjm seems to have done this. What I have been doing is using a variable into the name of the text box. This has worked before. I use dechex(time()) and use this as the name. The reason is that some of the older web pages got screwed up by a web browser trying to artificial intelligent and complete what I am entering based on the name of the text box. I then store the name in a session variable so the update page can use it for the name of the text box. 

     

    Hope this makes

    $Comment_Name = dechex(time());
    $_SESSION['COMMENT_NAME'] = $Comment_Name;
    
    and for the text box
    
    <input type="text" maxlength="32" size="42" name= "<?=$Comment_Name?>"; value="<?=$SE_Comment?>">

    This has worked before but can't work out how I did it.

  12. I have a text box on page 1 that has a unique changing value using

     

    $Comment_Name = dechex(time());

    $_SESSION['COMMENT_NAME'] = $Comment_Name;

    // Lines 42/43

                Comment&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="text" maxlength="32" size="42" name= "<?=$Comment_Name?>"; value="<?=$SE_Comment?>">&nbsp;&nbsp;Max 32 Characters

     

    As the name of the text box is stored in a session variable then it should be a simple mater of retrieving the value on page 2.

    /****************************/ 

    $CommentID = $_SESSION['COMMENT_NAME'];

    if($direction  == "Add record")

    {

                    $Comment_Name = $_SESSION['COMMENT_NAME'];

                    $_SESSION['DE_MyReason'] = $_POST['Reason']; // Keep the default regardless

                    $_SESSION['DE_Money_In'] = $_POST['MoneyIn'];

                    $_SESSION['DE_Money_Out'] = $_POST['MoneyOut'];

                    $_SESSION["DE_DD_Entry"] = $_POST['DD_Entry'];

                    $_SESSION["DE_MM_Entry"] = $_POST['MM_Entry'];

     

                    $_SESSION["DE_Comment"] = $_POST[$CommentID];  /* This should retreve the posted value */

     

    Any help on this please?

  13. Cant close this topic. Wanted to but have a new problem. When I look at the page in google chrome I get This page isn’t working ... ERR_TOO_MANY_REDIRECTS

    But works fine in firefox. I am not doing any redirecting only if I haven't logged in then back to the log in page.

  14. www.desmond-otoole.co.uk/secure/securefunctions.php

    /bank/admin/index.php

    what should I do in the index.php file to access securefunctions.php

    require("../secure/SecureFunctions.php");
    require("../../secure/SecureFunctions.php");
    require("www.desmond-otoole.co.uk/secure/SecureFunctions.php");

    Nothing seems to work

    I just get a stupid google chrome page saying
    This page isn’t working

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.