Jump to content

Meg_Griffin

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Meg_Griffin

  1. <?php include('../config/header.php'); ?><?php include('../config/globals.php'); ?> <div class="body"> <div class="topo"></div><h1 class="title">Register Employees</h1> <form method='POST' action='<?php echo DIR ?>/staff/register_employees.php' class="table"> <p>Name: <input name='name' /></p> <p>Phone Number: <input name='phone_number' /></p> <p>Adress: <input name='adress' /></p> <p>Sallary: R$ <input name='sallary' /></p> <p>Occupation: <input name='occupation' /></p> <p>Department: <input name='department' /></p> <button type='submit'>Register</button></form></div><?php if (count($_POST) > 0){ insert($_POST, 'employees'); ob_clean(); header('LOCATION: '.DIR.'/employees/list_employees.php'); }?><?php include_once('../config/footer.php'); ?>
  2. Hi guys,I have a system and the registration part of it doesn't work but it doesn't report any errors.Any ideas of what is going on?
  3. Guys,I want this effect on scroll. I Hope it is better explained...
  4. Well,I know about the overflow property but I want something better. I want my scroll to be invisible. I'm building an one page portfolio site,and I think that would be a solution for that problem.If anyone suggests something better I would be grateful.
  5. Is there a way to get an infinite scroll in css?
  6. Thanks. I'm distracted today
  7. Meg_Griffin

    coding problem

    That's my full code: <?php $test = search_by_id('tests',$_GET['test_id']); $students = select_all('students'); $questions = search_questions($_GET['test_id']);?> <h2>Test Attempt <?php echo $test['name']?></h2><select> <input value="students">Students/> <input value="questions">Questions/> <input name='answers[]'></select> <?php //code to register attemptif (count($_POST) > 0){ $data = array( 'test_id' => $_POST['test_id'], 'student_id' => $_POST['student_id'], 'answers' => implode("###", $_POST['answers']), ); insert($data, 'attempts'); ?> and I get this error: Parse error: syntax error, unexpected $end in C:\xampp\htdocs\exercise_01\templates\attempts\register.php on line 23 I tried to do it in other ways,but I still get different errors.
  8. What's the big deal about the deep web? Is it really so scary?I always read the same thing,that the deep web is where hackers,crackers and a plenty of criminals hide to avoid authorithies and keep their privacy.Can anybody tell me what is it like?
  9. rahultailwalmy full code: <h2>Register Student</h2> <?php //code to register student<form method='POST' action='<?php echo $_SERVER['PHP_SELF']; ?>'> <p>Name <input name="name" /></p> <p>E-mail <input name="email" /></p> <button type="submit">Save</button></form> <?php if (count($_POST) > 0){ insert($_POST, 'students'); ob_clean(); header('LOCATION: '.ROOT.'/students/list.php'); }?> ?>
  10. Well,that is part of file register.php on my project. It's a small system using a DB. I don't know why specifically this file is not working properly. The others are working perfectly.on line 5 is <form method='POST' action='<?php echo $_SERVER['PHP_SELF'] ?>'>
  11. That's my code: <form method='POST' action='<?php echo $_SERVER['PHP_SELF'] ?>'> <p>Name <input name="name" /></p> <p>E-mail <input name="email" /></p> <button type="submit">Save</button></form> The output shows: Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\exercise_01\templates\students\register.php on line 5 When I got rid of this "<" nothing happened.
  12. Thanks a lot,the scientist.
  13. Why can't I create that table? CREATE TABLE students ( PRIMARY KEY (id), name varchar(255) NOT NULL, email varchar(255) NOT NULL); every time I try to create that table the output shows: Error Code: 1072. Key column 'students_id' doesn't exist in table I'm using MySQL Workbench.
  14. Thanks for your attention,guys. I've solved my problem.
  15. Ingolme,thank you.But there's one more doubt...why does this code show me a different output? It outputs "reprovado" instead of "sem notas cadastradas". elseif ($media=="indefinido") echo "Sem notas cadastradas";
  16. Meg_Griffin

    What's wrong?

    Hi guys,please help me with my code. Everything is fine,except for this line: elseif (3.2<$media<7) echo "Em recuperação"; It generates a syntax error: Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\questao_01.php on line 49 So,the question is: if the specified condition in my exercise is 3.2<media<7 why is this wrong? .
  17. How can I order this array with for? the output should be: 1.Item A2.Item B3.Item C4.Item D5.Item E6.Item F
  18. Full name: IsabelAlternative name(s): belBirth date(dd/mm/yyyy): 31.07.1991Gender: FemaleZodiacal sign: LionCountry of residance: BrazilHeight: 5' 2.25"Weight: 100lbsEyes: Light brownHair: Long BlackSmoking/Drinking/Drugs: no/yes/no wayFavourite Music: Rock,Classical musicPets: no pets (unfortunately)Education: Bachelors in Graphic Design.Interests:My favourite hobbies are watching football (the one americans call soccer) and reading. I read a lot,I'm always reading (good books not that thing about vampires shining in the sun. I like good lit.) I like CG,specially 3D modeling using Maya. I'm always trying to improve my design skills and learning programming. I'm just a beginner now,but one day I want to be a good programmer.
  19. Hi guys I am a begginer in PHP and I have this doubt:I have to write a script to obtain the current month,and if the month is january the output should be: "We are in january,it's very hot." but if the month is not january,the output should be "We aren't in january,it's not very hot."Hope you can help me.
×
×
  • Create New...