473,326 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Hey!am developing my first website thou am having challenges, Kindly assist thank you

1
Parse error: syntax error, unexpected '$db'(T_VARIABLE)in C:\xampp\htdocs\Gardo\RegisterUser.php on line 11.



<?php

require_once 'includes/DBOperations.php';

if($_SERVER['REQUEST_METHOD'] == 'POST') //checks if the user has provided the right input
if (isset($_POST['username']) and
(isset($_POST['email']) and
(isset($_POST['password'] ))

//execution of the function if the vallues entered are correct
$db = new DBOperations(); //LINE 11
if ($db->createUser(
$_POST['username'],
$_POST['password'],
$_POST['email']
)){
$response['error'] = false;
$response['message'] = "User Registered successfully";
}else{
$response['error'] = true;
$response['message'] = "Please confirm your registration some error occured";
}else{
$response['error'] = true;
$response['message'] = "Required fields are missing";
}else{
$response['error'] = true;
$response['message'] = "Invalid request";
}
echo json_encode($response);
Jan 18 '18 #1
1 1998
Luuk
1,047 Expert 1GB
It would be nice to know what is inside this file (lien#3???)
Expand|Select|Wrap|Line Numbers
  1. require_once 'includes/DBOperations.php';
Expand|Select|Wrap|Line Numbers
  1. Use CODE tags if you post code....
Jan 21 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Peter | last post by:
Hi All, I am a novice .NET developer, using a 60 trial version of VS.NET 2003 to learn .NET. I would like to develop a website which can be accessed from a mobile device. What are my...
3
by: Patrick | last post by:
I need to develop a website bearing the following in mind, - the site will have to be dymanic (i.e. the layout can change from time to time), - its a church website My initial intention was to...
4
by: Allen McGuire | last post by:
Any ideas would be great - I hope I provide enough information here. I'm getting a bit frustrated - I'm a newbie in the .NET programming arena. Full Error returned from VWD 2005 Express Beta:...
1
by: Philipp Lenz | last post by:
I'm completely new to ASP.Net 2.0 and I'm baffled about what to do to get this to work. FYI, I'm not new at this, I've used asp.net 1.1 for allmost 4 years now. I'm running a development...
7
by: sassy | last post by:
hi Im new here....i am developing awebsite using Flash.... i want to know what programming language can best be used with flash....
1
by: Chris | last post by:
Hi, I am working on a small which involves a touchscreen and I need to create a on-screen keyboard. I need some assistance with a few questions 1. For the the buttons, do I user their text as...
1
by: samadams_2006 | last post by:
Hello, I have Visual Studio 2005 and am developing my first web site. I see TreeViews, ReportViewers, etc. but I'm not sure which approach that I should choose. Let me tell you what I'm going...
2
by: KMEscherich | last post by:
Hi there, am wondering if someone can please tell me what I need to do to accomplish the following: I am developing a website that encompasses a BOOK. In other words, each chapter in a book will...
1
by: Sam Mokolutlo | last post by:
I"m developing a website with 'webpagemaker' and I want users to place comments. There's an Events page were users should share Ideas and I just can't figue out just how to do it. I need Help
0
by: ilyasequence | last post by:
Hi all, First of all I will describe the setup and then ask the question. I have created a test website which is running on Apache 2.2 on Windows and uses Ruby on Rails 1.8 ( this older version...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.