Jump to content


Photo

mysql include


  • This topic is locked This topic is locked
3 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 26 May 2006 - 09:11 PM

Here is the code
<?php
if ($_POST['emailaddress'] == "") {
print('I am sorry please go back and fill in the email address field properly');
}elseif ($_POST['firstname'] == "") {
print('I am sorry please go back and fill in the first name correctly');
}elseif ($_POST['lastname'] == "") {
print('I am sorry please go back and fill in the last name correctly');
}else {
return true;
include(/home/freelan4/public_html/cgi-bin/mailinglist/dbconnector.php);
}
?>
here is there error
Parse error: parse error, unexpected '/' in /home/freelan4/public_html/cgi-bin/mailinglist/mailinglisthandler.php on line 17

Is this the proper way I am wanting to validate it, and if it properly validates then send it over the the file to work on setting up the database connection, and start getting it to enter the information there.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 26 May 2006 - 09:55 PM

And this is a MySQL-related question how? AFAIK, you need to pass a string literal to the include() function, hence the parsing error in PHP.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 26 May 2006 - 09:56 PM

I did not intend to post here so I reposted in php, It was an accident.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 26 May 2006 - 10:49 PM

[!--quoteo(post=377425:date=May 26 2006, 05:56 PM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ May 26 2006, 05:56 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I did not intend to post here so I reposted in php, It was an accident.
[/quote]

Closing this thread.

Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users