Jump to content

jobs1109

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jobs1109's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi everyone i got it solved. I just turned off magic quotes in php.ini Thanks
  2. Hi everyone, I am having a problem with using quotation marks / apostrophe with php and mysql. If I enter the following lines in mysql. "user's resume" when I do a query from mysql i get back " User\'s resume" it's adding a slash before the apostrophe. How can I fix this ? Thanks.
  3. How do I modify it so that it can be displayed mutiple times and still show the correct login/logout option ?
  4. Hi, I am having a bit of problem with my login/logout script. When user is logged in I want the script to show logout and if they are not login I want the script to show login. The problem is even when the user is logged in it says "you must be logged in Click here to login " here is the script Please help <?php session_start(); $_SESSION['username'] = $_POST['username']; if ($_SESSION['username']) echo "Welcome, ".$_SESSION['username']."!<br><a href='logout.php'>Logout</a>" ; else die("you must be logged in <a href='Login.php'>Click here to login</a>"); ?> what did I do wrong in this script ? Thanks
  5. Thanks for your help I will try it.
  6. Hi yes employer are assigned to a company and jobs are assigned to a company. I am not sure how to implement the relationships.
  7. Hi I got three tables (employers , company , and Jobs) Employer table holds info about employer. Company hold info about the company and jobs table holds info about jobs. I was just wandering what would be a good way to link these tables in the database ? Here is the coding for each table. Employer Table CREATE TABLE IF NOT EXISTS `employers` ( `id` int(11) NOT NULL, `username` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `email` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Jobs Table CREATE TABLE IF NOT EXISTS `Jobs` ( `id` int(11) NOT NULL, `JobTitle` varchar(200) default NULL, `Company` varchar(200) default NULL, `Salary` varchar(30) default NULL, `Description` varchar(2000) default NULL, `CompanyURL` varchar(200) default NULL, `PhoneNumber` varchar(30) default NULL, `Requirements` varchar(2000) default NULL, `JobCategory` varchar(100) default NULL, `JobType` varchar(100) default NULL, `Apply_To` varchar(1000) NOT NULL, `Email` varchar(200) NOT NULL, `modified_at` datetime NOT NULL, `PostedOnDate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Address` varchar(250) NOT NULL, `State` varchar(200) NOT NULL, `City` varchar(200) NOT NULL, `Country` varchar(100) NOT NULL, `Zipcode` varchar(100) NOT NULL, `JobID` varchar(100) NOT NULL, `WorkExperience` varchar(2000) NOT NULL, `EducationRequirement` varchar(2000) NOT NULL, `WebsitePostedFrom` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Company Table CREATE TABLE IF NOT EXISTS `Company` ( `id` int(11) unsigned NOT NULL auto_increment, `CompanyName` varchar(100) NOT NULL, `Address` varchar(100) NOT NULL, `Logo` varchar(100) NOT NULL, `PhoneNumber` varchar(25) NOT NULL, `ContactPerson` varchar(25) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
  8. Here is the structure for the table -- -- Table structure for table `Company` -- CREATE TABLE IF NOT EXISTS `Company` ( `id` varchar(25) NOT NULL, `CompanyName` varchar(100) NOT NULL, `Address` varchar(100) NOT NULL, `Logo` varchar(100) NOT NULL, `PhoneNumber` varchar(25) NOT NULL, `ContactPerson` varchar(25) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  9. Hi I am getting this error message and don't know why. please help this is the message " Error: Duplicate entry '' for key 1 " Here is the code <?php include'../DB-connection.php'; $sql="INSERT INTO Company(CompanyName,Address,Logo,PhoneNumber,ContactPerson) VALUES('".mysql_real_escape_string($_POST[CompanyName])."', '".mysql_real_escape_string($_POST[Address])."', '".mysql_real_escape_string($_POST[Logo])."', '".mysql_real_escape_string($_POST[PhoneNumber])."', '".mysql_real_escape_string($_POST[ContactPerson])."')"; if(!mysql_query($sql,$con)) { die(' Error: '. mysql_error()); } echo " <center>your compnay info added &nbsp &nbsp &nbsp <a href='User-Login.php'>Login to Post a job</a> </center>" ; mysql_close($con) ?>
  10. Hi, I am thinking about starting a coupon website. I would like to use php and mysql. I was wander if there is any tutorial on how to go about coding a coupon website ? Thanks
  11. both users TABLE and Jobs TABLE =InnoDB
  12. Hi when I remove the brackets I get the followin message. Here is the code ALTER TABLE Jobs ADD FOREIGN KEY jointable REFERENCES users (id); here is the error message Error SQL query: ALTERTABLE Jobs ADDFOREIGNKEY jointable REFERENCES users( id ) MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REFERENCES users (id)' at line 1
  13. Hi everyone, I am trying to add a foreign key (jointable) to an existing table called (Jobs) and I would like it to reference the id in users table. Also I like to have it auto update when records added and deleted. ENGINE=InnoDB When I run the following code I get an error message. ALTER TABLE Jobs ADD FOREIGN KEY (jointable) REFERENCES users (id); here is the error message Error SQL query: ALTERTABLE Jobs ADDFOREIGNKEY ( jointable )REFERENCES users( id ) MySQL said: #1072 - Key column 'jointable' doesn't exist in table What am I doing wrong ? please help
  14. Hi , Here is what I got so far , a form where users can login and post thei jobs now I would like to have them edit their own postings. http://www.alwayshawaii.com/Sawh-Network/Hilo-Jobs/User-Login/User-Login.php
×
×
  • 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.