-5

I saw here about my problem PHP Script to Edit DNS Records in CPanel but When I try to use the dnsclass.php. I can create a object like this:

$zones = new zone_records("cpaneluser", "pass", "website_to_login", "domain_of_records")

But I can't use this:

 $zones->addrecord($type, $target, $name, $ttl)

I'm having this problem :
Parse error: syntax error, unexpected T_VARIABLE in /home/mcser325/public_html/test.php

My code:

include 'classdns.php';
$zones = new zone_records("**", "**", "**", "**")
$zones->addrecord("**", "**", "**", "**")
Community
  • 1
  • 1
  • PHP error messages show line numbers. Show us the line that's causing the error. If that's the line, it's probably the lack of semicolon. – ceejayoz Jul 12 '13 at 17:14
  • And it's worth including a couple of lines either side of that one, too, as sometimes the error occurs elsewhere but the interpreter doesn't pick it up til later. – andrewsi Jul 12 '13 at 17:15
  • I edited the title because this has *nothing* to do with editing DNS records. – ceejayoz Jul 12 '13 at 17:17
  • Ok. Sorry about the tittles. I wrote the code. – user2577269 Jul 12 '13 at 17:19
  • @user2577269 - yeah, you're missing your semicolons. – andrewsi Jul 12 '13 at 17:20
  • 1
    I see too many questions like this. Take the time to learn how to [interpret errors and fix your code](http://jason.pureconcepts.net/2013/05/fixing-php-errors/). – Jason McCreary Jul 12 '13 at 17:22

1 Answers1

3

There is no semicolon at the end of the statement which is causing the error.

Vivek Sadh
  • 4,230
  • 3
  • 32
  • 49