Jump to content

Pavlin24

Members
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Pavlin24

  • Rank
    Newbie
  • Birthday 07/25/1966

Contact Methods

  • Website URL
    http://www.pavlin-angelov.net

Profile Information

  • Location
    Bulgaria

Previous Fields

  • Languages
    English,Bulgarian
  1. Pavlin24

    read php-file with the browser from local host

    Do you think it is possible newbie like me to find a job from distance as web designer?
  2. Pavlin24

    read php-file with the browser from local host

    Thank you vert much Ingolme! It works now.
  3. Pavlin24

    read php-file with the browser from local host

    Yes. Thank you Ingolme. Now it works. But other problem. With encoding. I wrote text with cyrillic letters and it shows like this - ???????. Pls see the attachment. Doc1.docx
  4. Pavlin24

    read php-file with the browser from local host

    Excuse me, but how I must use the localhost. On the old PC I did not do anything special. It worked directly.
  5. Hallo, Can anybody help for this question. I have changed my computer. And now my browser (google chrome) can not read php-files from my computer. I have installed PHP from XAMPP. What may be the reason for this?
  6. Pavlin24

    date_diff () - problem

    Thank you.
  7. Pavlin24

    date_diff () - problem

    Hello. I try to find the the difference between two dates in months. I use this code: $diff=date_diff($date2_row[0],$cur_date); This is error message: Fatal error: Call to undefined function date_diff() Can anybody help me to find the reason for this.
  8. Pavlin24

    calculate data in table

    Yes, that may be a problem too. But the main problem was that I had to pass the query trough mysql_fetch_array() function. It works now. Thank you.
  9. Pavlin24

    calculate data in table

    Hello there, some help in this? Is it possible to calculate numeric data in table with data coming from forms? I mean something like this: mysql_query("UPDATE ov SET dt_ob=(dt_ob+'$suma1') WHERE smetka='$debit' ",$con) dt_ob and smetka are coloumns in the table, $suma1 and $debit are data coming from form. The code above do not work to me.
  10. Pavlin24

    styling HTML when in PHP

    To Petrucho: No errors are shown. Everything works, except of styling the width of this column. To dsonesuk: I have semicolon. I replaced the double quotes, I tried with class too, no result. But I found that the same code placed in other file works! I even copied the code from working file to not-working, but it still do not work in second file. It is some kind of mystery.
  11. Pavlin24

    styling HTML when in PHP

    Hallo, can anybody help me about this questuon. Is it possible to style HTML table heading, when it is in PHP? I mean something like this: <?php echo "<table border='1'> <tr> <th style='width:150px;'>дата на док.</th> </tr> </table> " ?> This not work . I want to set width of the heading to be 150 px. Is there other way?
  12. Pavlin24

    missing argument - undefined variable

    Thank you very much ! ! I have made corrections that you suggested. Now it is working. Here is the final code: ------------------------------------------------------ <?php class Car { public $ime="ne defenirana"; public $marka="ne defenirana"; public $model="ne definiran"; public $color="not defined"; public function __construct($ime) { $this->ime=$ime;} public function start($time) { echo $this->ime." starts at ".$time.".";} } $myCar=new Car("My car"); $myCar->marka="volkswagen"; $myCar->model="golf"; $myCar->color="grey"; $time=12.00; $myCar->start($time); echo "<br>"; echo "The color of my car is ".$myCar->color; echo "<br>"."The brand of my car is ".$myCar->marka."<br>"; $myBrothersCar=new Car("My brother's car"); $myBrothersCar->marka="volkswagen"; $myBrothersCar->model="passat"; $myBrothersCar->color="green"; $time=14.00; $myBrothersCar->start($time); echo "The car of my brother is ".$myBrothersCar->marka." ".$myBrothersCar->model." with color ".$myBrothersCar->color."."; ?>
  13. Pavlin24

    missing argument - undefined variable

    Hallo. I have difficulties understanding an error message. It is about creating class and 2 objects. The problem is with variable $ime. I have defined it once in the class. Then I assigned other values in the objects. It shows as undefined. Can anybody help me! ------------------------------------------------------------------------------------------------------------------ <?php class Car { public $ime="ne defenirana"; public $marka="ne defenirana"; public $model="ne definiran"; public $color="not defined"; public function __construct($ime) { $this->ime=$ime;} public function start($time) { echo $ime." starts at ".$time.".";} } $myCar=new Car(); $myCar->ime="My car"; $myCar->marka="volkswagen"; $myCar->model="golf"; $myCar->color="grey"; $time=12.00; $myCar->start($time); echo "<br>"; echo "The color of my car is ".$myCar->color; echo "<br>"."The brand of my car is ".$myCar->marka."<br>"; $myBrothersCar=new Car(); $myBrothersCar->ime="My brother's car"; $myBrothersCar->marka="volkswagen"; $myBrothersCar->model="passat"; $myBrothersCar->color="green"; $time=14.00; $myBrothersCar->start($time); echo "The car of my brother is ".$myBrothersCar->marka." ".$myBrothersCar->model." with color ".$myBrothersCar->color."."; ?> --------------------------------------------------------------------------------------------------------------------------------------------------- Warning: Missing argument 1 for Car::__construct(), called in C:xampphtdocsuploadtest.php on line 13 and defined in C:xampphtdocsuploadtest.php on line 7Notice: Undefined variable: ime in C:xampphtdocsuploadtest.php on line 8Notice: Undefined variable: ime in C:xampphtdocsuploadtest.php on line 10starts at 12.The color of my car is greyThe brand of my car is volkswagenWarning: Missing argument 1 for Car::__construct(), called in C:xampphtdocsuploadtest.php on line 25 and defined in C:xampphtdocsuploadtest.php on line 7Notice: Undefined variable: ime in C:xampphtdocsuploadtest.php on line 8Notice: Undefined variable: ime in C:xampphtdocsuploadtest.php on line 10starts at 14.The car of my brother is volkswagen passat with color green.
  14. Pavlin24

    create class

    Yes. The name of the function was the problem. Thank you.
  15. Pavlin24

    create class

    Hallo. I need some help on creating class in PHP. I tried to create a class with two properties and one method. Here is the code: <?php class Animal { private $vid; public $color; public function __construct ($vid){ $this->vid=$vid;} public function Print(){ echo $this->vid;} } $obj=new Animal; echo $obj->vid." "; echo $obj->color; ?> And here is the error message: Parse error: syntax error, unexpected T_PRINT, expecting T_STRING in /var/www/packet3/pavlin-angelov.net/htdocs/upload/test.php on line 7 What might be the problem?
×