Guest User

CV BUILDER @@@@@@@@@@

a guest
Apr 25th, 2017
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.21 KB | None | 0 0
  1. //download.php//
  2.  
  3. <?php
  4. $file = 'ISVP.rar';
  5.  
  6. if (file_exists($file)) {
  7. header('Content-Description: File Transfer');
  8. header('Content-Type: application/octet-stream');
  9. header('Content-Disposition: attachment; filename="'.basename($file).'"');
  10. header('Expires: 0');
  11. header('Cache-Control: must-revalidate');
  12. header('Pragma: public');
  13. header('Content-Length: ' . filesize($file));
  14. readfile($file);
  15. exit;
  16. }
  17. ?>
  18. //error.php//
  19.  
  20. <?php
  21. session_start();
  22. ?>
  23. <!DOCTYPE html>
  24. <html>
  25. <head>
  26. <title>ISVP</title>
  27. <meta charset="UTF-8">
  28. <meta name="viewport" content="width = device-width, initial-scale = 1.0">
  29. <link rel="stylesheet" type="text/css" href="home.css" />
  30. <link rel="shortcut icon" href="stocks.ico" />
  31. <style type="text/css">
  32. header{
  33. position:relative;
  34. width: 100%;
  35. height: 50px;
  36. background-color: black;
  37. top:0px;
  38. left: 0px;
  39. font-family: Times;
  40. }
  41. .nm{
  42. position: relative;
  43. color: white;
  44. float: left;
  45. text-align: left;
  46. font-size: 30px;
  47. margin: 8px 0px 0px 20px;
  48. }
  49. section{
  50. position: relative;
  51. width: 100%;
  52. height: 610px;
  53. background-color: black;
  54. opacity: 0.9;
  55. }
  56. footer{
  57. position: relative;
  58. width: 100%;
  59. height: 35px;
  60. background-color: black;
  61. left: 0px;
  62. }
  63. .f1{
  64. position: relative;
  65. font-size:15px;
  66. color: white;
  67. float: right;
  68. left: 0px;
  69. padding: 10px 0px 0px 20px;
  70. margin-right:10px;
  71. }
  72. .txt{
  73. position: absolute;
  74. color: white;
  75. width: 100%;
  76. top: 20%;
  77. text-align: center;
  78. font-size: 30px;
  79. font-family: Times;
  80. }
  81. button{
  82. background-color: black;
  83. color: white;
  84. border: 1px solid black;
  85. border-color:black;
  86. width:100px;
  87. height: 50px;
  88. font-size:30px;
  89. cursor: pointer;
  90. font-family: Times;
  91. background-opacity: 0.6;
  92. }
  93. button:hover {
  94. box-shadow: 0 12px 16px 0 rgba(255,255,255,0.24),0 17px 50px 0 rgba(255,255,255,0.19);
  95. }
  96. #l1{
  97. position: fixed;
  98. left: 31.5%;
  99. top: 39%;
  100. }
  101. #l2{
  102. position: fixed;
  103. left: 37.5%;
  104. top: 42%;
  105. }
  106. #l3{
  107. position: fixed;
  108. left: 46%;
  109. top: 39%;
  110. }
  111. </style>
  112. </head>
  113. <body>
  114. <header>
  115. <div class="nm">Intrinsic Stock Value Predictor</div>
  116. <a href="ISVP.php" class="user">Return</a>
  117. </header>
  118. <section></section>
  119. <div class="txt">
  120. <p>You have entered Invalid username or password</p>
  121. <p>Please entered valid username or password</p>
  122. <p id="l1">Click </p><form id="l2" action="ISVP.php"><button>return</button></form><p id="l3"> to go back to main page!!</p>
  123. </div>
  124. <footer>
  125. <div class="f1">&copy 2017 Intrinsic Stock Value Predictor</div>
  126. </footer>
  127. </body>
  128. </html>
  129. //functions.php//
  130. <?php
  131. session_start();
  132.  
  133. $host ='localhost';
  134. $user = 'root';
  135. $pass = '';
  136. $db = 'authentication';
  137.  
  138. $con = mysqli_connect($host, $user, $pass, $db);
  139.  
  140. function getUserData($id){
  141. $array = array();
  142. $q = mysqli_query($con, "SELECT * FROM 'users' WHERE 'id' ='$id'");
  143. while ($r = mysqli_fetch_assoc($con,$q)) {
  144. $array['id'] = $r['id'];
  145. $array['username'] = $r['username'];
  146. $array['password'] = $r['password'];
  147. $array['email'] = $r['email'];
  148. $array['cont_num'] = $r['cont_num'];
  149. }
  150. return $array;
  151. }
  152.  
  153. function getId($username){
  154. $q = mysqli_query($con, "SELECT * FROM 'users' WHERE 'username' ='$username'");
  155. while ($r = mysqli_fetch_assoc($con,$q)) {
  156. return $r['id'];
  157. }
  158. }
  159.  
  160. ?>
  161. //h.php//
  162. <?php
  163. include"functions.php";
  164. ?>
  165. <!DOCTYPE html>
  166. <html>
  167. <head>
  168. <title>ISVP</title>
  169. <meta charset="UTF-8">
  170. <meta name="viewport" content="width = device-width, initial-scale = 1.0">
  171. <link rel="stylesheet" type="text/css" href="home.css" />
  172. <link rel="shortcut icon" href="stocks.ico" />
  173. </head>
  174. <body>
  175. <header id="main">
  176. <div class="nm">Intrinsic Stock Value Predictor</div>
  177. <a href="#" class="user"><?php echo $_SESSION['username'];?></a>
  178. <img id="help" onclick="openNav()" src="help.png" />
  179. </header>
  180.  
  181. </body>
  182. </html>
  183.  
  184. //home.css//
  185.  
  186. body{
  187. background-color: #666666;
  188. }
  189. header{
  190. position:fixed;
  191. width: 100%;
  192. height: 50px;
  193. background-color: black;
  194. top:0px;
  195. left: 0px;
  196. }
  197. .nm{
  198. position: fixed;
  199. color: white;
  200. float: left;
  201. text-align: left;
  202. font-size: 30px;
  203. margin: 8px 0px 0px 20px;
  204. }
  205. #help{
  206. position: fixed;
  207. color: white;
  208. text-align: center;
  209. text-decoration: none;
  210. display: inline-block;
  211. font-size: 20px;
  212. left: 1120px;
  213. padding: 13px 15px 13px 15px;
  214. cursor: pointer;
  215. }
  216. .hl{
  217. position: relative;
  218. }
  219. .ht{
  220. position: relative;
  221. top: -35px;
  222. left: 40px;
  223. }
  224. .user{
  225. position: fixed;
  226. border-left: 3px solid white;
  227. color: white;
  228. text-align: center;
  229. text-decoration: none;
  230. display: inline-block;
  231. font-size: 20px;
  232. left: 1240px;
  233. padding: 13px 40px 13px 30px;
  234. cursor: pointer;
  235. }
  236. body {
  237. margin: 0;
  238. font-family: 'Lato', sans-serif;
  239. }
  240.  
  241. .overlay {
  242. height: 0%;
  243. width: 100%;
  244. position: fixed;
  245. z-index: 1;
  246. top: 0;
  247. left: 0;
  248. background-color: rgb(0,0,0);
  249. background-color: rgba(0,0,0, 0.9);
  250. overflow-y: hidden;
  251. transition: 0.5s;
  252. }
  253.  
  254. .overlay-content {
  255. position: relative;
  256. top: 5%;
  257. width: 100%;
  258. color: white;
  259. text-align: left;
  260. margin-top: 30px;
  261. }
  262.  
  263. .overlay a {
  264. padding: 8px;
  265. text-decoration: none;
  266. font-size: 36px;
  267. color: #818181;
  268. display: block;
  269. transition: 0.3s;
  270. }
  271.  
  272. .overlay a:hover, .overlay a:focus {
  273. color: #f1f1f1;
  274. }
  275.  
  276. .overlay .closebtn {
  277. position: absolute;
  278. top: 20px;
  279. right: 45px;
  280. font-size: 60px;
  281. }
  282. #asap{
  283. margin-left: 51px;
  284. }
  285. .about1{
  286. position: fixed;
  287. width: 45%;
  288. height: 40%;
  289. margin-top: 70px;
  290. margin-left: 4%;
  291. box-shadow: 0px 0px 12px;
  292. text-align: center;
  293. background-color: #e6e6e6;
  294. }
  295. .about2{
  296. position: fixed;
  297. width: 45%;
  298. height: 40%;
  299. margin-top: 70px;
  300. margin-left: 51%;
  301. box-shadow: 0px 0px 12px;
  302. text-align: center;
  303. background-color: #e6e6e6;
  304. }
  305. #hd{
  306. font-size: 30px;
  307. color: #4d4d4d;
  308. }
  309. #bd{
  310. font-size: 20px;
  311. padding-top: 5px;
  312. }
  313. .inst{
  314. position: fixed;
  315. width: 91.9%;
  316. height: 12%;
  317. margin-top: 400px;
  318. margin-left: 4%;
  319. box-shadow: 0px 0px 12px;
  320. padding: 15px;
  321. font-size: 20px;
  322. color: #1a1a1a;
  323. background-color: #e6e6e6;
  324. }
  325.  
  326. .down{
  327. position: fixed;
  328. background-color: green;
  329. color: white;
  330. border: 1px solid green;
  331. width:250px;
  332. height: 50px;
  333. border-radius: 40px;
  334. font-size:30px;
  335. cursor: pointer;
  336. font-family: Times;
  337. margin-top: 540px;
  338. margin-left: 75%;
  339. }
  340. * {box-sizing:border-box}
  341. .mySlides {display:none}
  342.  
  343. @font-face {
  344. font-family: KaushanScript;
  345. src: url("KaushanScript.otf") format("opentype");
  346. }
  347. .slideshow-container {
  348. position: fixed;
  349. width: 60%;
  350. margin-top: 530px;
  351. margin-left: 5%;
  352. border-radius: 40px;
  353. background-color: rgba(0,0,0,0.9);
  354. text-align: center;
  355. color: white;
  356. font-size: 20px;
  357. font-family: KaushanScript;
  358. }
  359. .dot {
  360. height: 13px;
  361. width: 13px;
  362. margin: 0 2px;
  363. background-color: #bbb;
  364. border-radius: 50%;
  365. display: inline-block;
  366. transition: background-color 0.6s ease;
  367. }
  368.  
  369. .active {
  370. background-color: #717171;
  371. }
  372. .fade {
  373. -webkit-animation-name: fade;
  374. -webkit-animation-duration: 1.5s;
  375. animation-name: fade;
  376. animation-duration: 1.5s;
  377. }
  378. @-webkit-keyframes fade {
  379. from {opacity: .4}
  380. to {opacity: 1}
  381. }
  382. @keyframes fade {
  383. from {opacity: .4}
  384. to {opacity: 1}
  385. }
  386.  
  387. footer{
  388. position: fixed;
  389. width: 100%;
  390. height: 40px;
  391. background-color: black;
  392. left: 0px;
  393. top: 654.5px;
  394. }
  395. .f1{
  396. position: relative;
  397. font-size:15px;
  398. color: white;
  399. left: 1090px;
  400. padding: 10px 0px 0px 20px;
  401. }
  402.  
  403. //home.php//
  404.  
  405. <!DOCTYPE html>
  406. <html>
  407. <head>
  408. <title>ISVP</title>
  409. <meta charset="UTF-8">
  410. <meta name="viewport" content="width = device-width, initial-scale = 1.0">
  411. <link rel="stylesheet" type="text/css" href="home.css" />
  412. <link rel="shortcut icon" href="stocks.ico" />
  413. </head>
  414. <body>
  415. <header id="main">
  416. <div class="nm">Intrinsic Stock Value Predictor</div>
  417. <a href="ISVP.php" class="user">LogOut</a>
  418. <div id="help" onclick="openNav()">
  419. <img class="hl" src="help.png" />
  420. <div class="ht">
  421. Help
  422. </div>
  423. </div>
  424. </header>
  425. <div id="myNav" class="overlay">
  426. <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
  427. <div class="overlay-content">
  428. <ul>
  429. <li>Download the ISVP Program</li><br>
  430. <li>After downloading there will be a readMe file which will explain how to excute the program</li><br>
  431. <li>To understand the output or the graphical representaion of the stock predictor please refer to link below<a href="https://www.youtube.com" target="_black">How to interpret ISVP result</a></li><br>
  432. <li>For any queries feel free to contact us, E-mail Id : isvp@gmail.com</li>
  433. </ul>
  434. <p id="asap">We will get back to you as soon as possible.</p>
  435. </div>
  436. </div>
  437. <script>
  438. function openNav() {
  439. document.getElementById("myNav").style.height = "45%";
  440. }
  441.  
  442. function closeNav() {
  443. document.getElementById("myNav").style.height = "0%";
  444. }
  445. </script>
  446. <div class="about1">
  447. <p id="hd">State of the Art Algorithmic Prediction</p>
  448. <p id="bd">Intrinsic Stock Value Predictor provides a financial<br>services that utilizes an advanced self-learning algorithm<br>to analyze, model and predict the stock market.<br><br>Our program uses algorithmic prediction looking<br>for unique market opportunities.</p>
  449. </div>
  450. <div class="about2">
  451. <p id="hd">Solutions for Private and Institutional Investors</p>
  452. <p id="bd">Traders utilize these program as a tool to enhance portfolio performance, verify their own analysis and act on market opportunities faster.</p>
  453. </div>
  454. <div class="inst">
  455. Download ISVP to use stock prediction program. For any queries or question refere to HELP. Feel free to contact us at isvp@gmail.com, we will be available 24x7. We will get back to you as soon as possible.
  456. </div>
  457.  
  458. <div>
  459. <form action="download.php">
  460. <button type="submit" class="down">Download ISVP</button>
  461. </form>
  462. </div>
  463.  
  464. <div class="slideshow-container">
  465. <div class="mySlides fade">
  466. <p>Stocks: Let money make money for you.</p>
  467. </div>
  468. <div class="mySlides fade">
  469. <p>Never depend on the single income. Make investments to create a second source.</p>
  470. </div>
  471. <div class="mySlides fade">
  472. <p>The stock market is a device for transferring money from the impatient to the patient.</p>
  473. </div>
  474. <div class="mySlides fade">
  475. <p>The key of making money in stocks is not to get scared out them.</p>
  476. </div>
  477. </div>
  478. <div style="text-align:center">
  479. <span class="dot"></span>
  480. <span class="dot"></span>
  481. <span class="dot"></span>
  482. <span class="dot"></span>
  483. </div>
  484. <script>
  485. var slideIndex = 0;
  486. showSlides();
  487.  
  488. function showSlides() {
  489. var i;
  490. var slides = document.getElementsByClassName("mySlides");
  491. var dots = document.getElementsByClassName("dot");
  492. for (i = 0; i < slides.length; i++) {
  493. slides[i].style.display = "none";
  494. }
  495. slideIndex++;
  496. if (slideIndex> slides.length) {slideIndex = 1}
  497. for (i = 0; i < dots.length; i++) {
  498. dots[i].className = dots[i].className.replace(" active", "");
  499. }
  500. slides[slideIndex-1].style.display = "block";
  501. dots[slideIndex-1].className += " active";
  502. setTimeout(showSlides, 4000);
  503. }
  504. </script>
  505.  
  506.  
  507. <footer>
  508. <div class="f1">&copy 2017 Intrinsic Stock Value Predictor</div>
  509. </footer>
  510. </body>
  511. </html>
  512.  
  513. //isvp.css//
  514.  
  515. .bgimage{
  516. background: url(ow.jpg) no-repeat;
  517. width: 100%;
  518. height: 696px;
  519. background-size: 100% 100%;
  520. position: fixed;
  521. top: 0px;
  522. left: 0px;
  523. }
  524. header{
  525. position:fixed;
  526. width: 100%;
  527. height: 50px;
  528. background-color: black;
  529. top:0px;
  530. left: 0px;
  531. opacity: 0.6;
  532. font-family: 'Lato', sans-serif;
  533. }
  534. .nm{
  535. position: fixed;
  536. color: white;
  537. float: left;
  538. text-align: left;
  539. font-size: 30px;
  540. margin: 8px 0px 0px 20px;
  541. }
  542. .h1{
  543. position: fixed;
  544. color: white;
  545. float: left;
  546. text-align: left;
  547. font-size: 30px;
  548. margin: 5px 0px 0px 150px;
  549. }
  550. .login{
  551. position: fixed;
  552. border-left: 3px solid white;
  553. color: white;
  554. text-align: center;
  555. text-decoration: none;
  556. display: inline-block;
  557. font-size: 20px;
  558. left: 1240px;
  559. padding: 13px 40px 13px 30px;
  560. cursor: pointer;
  561. }
  562. input[type=text], input[type=password] ,input[type=email], input[type=int]{
  563. width: 100%;
  564. padding: 12px 20px;
  565. margin: 8px 0;
  566. display: inline-block;
  567. border: 1px solid #ccc;
  568. box-sizing: border-box;
  569. }
  570. button {
  571. background-color: blue;
  572. color: white;
  573. padding: 14px 20px;
  574. margin-top: 20px;
  575. border: none;
  576. cursor: pointer;
  577. width: 100%;
  578. }
  579. button:hover {
  580. opacity: 0.8;
  581. }
  582. .login-detail {
  583. padding: 30px 16px 20px 16px;
  584. }
  585. .login-bg {
  586. display: none;
  587. position: fixed;
  588. z-index: 1;
  589. left: 0;
  590. top: 0;
  591. width: 100%;
  592. height: 100%;
  593. padding-top: 60px;
  594. }
  595. .login-form {
  596. background-color: black;
  597. color: white;
  598. width:300px;
  599. height: 300px;
  600. margin: 5% auto 15% 970px;
  601. border: 1px solid #305281;
  602. }
  603. .animateL {
  604. -webkit-animation: animatezoom 0.6s;
  605. animation: animatezoom 0.6s
  606. }
  607. @-webkit-keyframes animatezoom {
  608. from {-webkit-transform: scale(0)}
  609. to {-webkit-transform: scale(1)}
  610. }
  611. @keyframes animatezoom {
  612. from {transform: scale(0)}
  613. to {transform: scale(1)}
  614. }
  615. .signup{
  616. position: fixed;
  617. color: white;
  618. text-align: center;
  619. text-decoration: none;
  620. display: inline-block;
  621. font-size: 20px;
  622. left: 1120px;
  623. padding: 13px 15px 13px 15px;
  624. cursor: pointer;
  625. }
  626. .signup-detail {
  627. padding: 20px 16px 20px 16px;
  628. }
  629. .signup-bg {
  630. display: none;
  631. position: fixed;
  632. z-index: 1;
  633. left: 0;
  634. top: -25px;
  635. width: 100%;
  636. height: 100%;
  637. padding-top: 60px;
  638. }
  639. .signup-form {
  640. background-color: black;
  641. color: white;
  642. width:300px;
  643. height: 500px;
  644. margin: 2% auto 15% 970px;
  645. border: 1px solid #305281;
  646. }
  647. .animateS {
  648. -webkit-animation: animatezoom 0.6s;
  649. animation: animatezoom 0.6s
  650. }
  651. @-webkit-keyframes animatezoom {
  652. from {-webkit-transform: scale(0)}
  653. to {-webkit-transform: scale(1)}
  654. }
  655. @keyframes animatezoom {
  656. from {transform: scale(0)}
  657. to {transform: scale(1)}
  658. }
  659. a:hover{
  660. opacity: 0.8;
  661. }
  662. section{
  663. position: fixed;
  664. margin-top: 120px;
  665. margin-left: 10px;
  666. font-size: 33px;
  667. color: #330066;
  668. font-family: 'Lato', sans-serif;
  669. }
  670. .intro{
  671. position: fixed;
  672. font-size: 18.5px;
  673. padding-top: 15px;
  674. }
  675. @font-face {
  676. font-family: KaushanScript;
  677. src: url("KaushanScript.otf") format("opentype");
  678. }
  679. #tip{
  680. position: fixed;
  681. width: 85%;
  682. height: 70px;
  683. margin-top: 530px;
  684. margin-left: 7%;
  685. border-radius: 40px;
  686. background-color: rgba(0,0,0,0.5);
  687. text-align: center;
  688. color: #bfbfbf;
  689. font-size: 25px;
  690. padding-bottom:10px;
  691. font-family: KaushanScript;
  692. }
  693. footer{
  694. position: fixed;
  695. width: 100%;
  696. height: 40px;
  697. background-color: black;
  698. opacity: 0.6;
  699. left: 0px;
  700. top: 654.5px;
  701. font-family: 'Lato', sans-serif;
  702. }
  703. .f1{
  704. position: relative;
  705. font-size:15px;
  706. color: white;
  707. left: 1090px;
  708. padding: 10px 0px 0px 20px;
  709. }
  710.  
  711. //isvp.php//
  712. <!DOCTYPE html>
  713. <html>
  714. <head>
  715. <title>CV - Builder</title>
  716. <meta charset="UTF-8">
  717. <meta name="viewport" content="width = device-width, initial-scale = 1.0">
  718. <link rel="stylesheet" type="text/css" href="ISVP.css" />
  719. <link rel="shortcut icon" href="stocks.ico" />
  720. </head>
  721. <body>
  722. <div class="bgimage" onclick="shiftBack()"></div>
  723. <header>
  724. <div class="nm">CV - Builder</div>
  725. <a href="#" onclick="document.getElementById('id01').style.display='block'; shiftBack();" class="login">Login</a>
  726. <div id="id01" class="login-bg">
  727. <form class="login-form animateL" action="login.php" method="post">
  728. <div class="login-detail">
  729. <label><b>Username</b></label>
  730. <input type="text" placeholder="Enter Username" name="username" required><br>
  731.  
  732. <label><b>Password</b></label>
  733. <input type="password" placeholder="Enter Password" name="password" required>
  734. <button type="submit" name="login_btn">Login</button>
  735. </div>
  736. </form>
  737. </div>
  738. <a href="#" onclick="document.getElementById('id02').style.display='block'; shiftEXT();" class="signup">Sign Up</a>
  739. <div id="id02" class="signup-bg">
  740. <form class="signup-form animateS" action="signup.php" method="post">
  741. <div class="signup-detail">
  742. <label><b>Username</b></label>
  743. <input type="text" placeholder="Enter Username" name="username" required><br>
  744.  
  745. <label><b>Password</b></label>
  746. <input type="password" placeholder="Enter Password" id="password" name="password" required><br>
  747.  
  748. <label><b>Confirm Password</b></label>
  749. <input type="password" placeholder="Confim Password" id="confirm_password" name="cpassword" required><br>
  750.  
  751. <label><b>E-mail Address</b></label>
  752. <input type="email" placeholder="Enter E-mail Id" name="email" required><br>
  753.  
  754. <label><b>Phone Number</b></label>
  755. <input type="int" placeholder="Enter Contact Number" name="cont_num" required><br>
  756. <button type="submit" name="sign_btn">Sign Up</button>
  757. </div>
  758. </form>
  759. </div>
  760. <script type="text/javascript">
  761. var login = document.getElementById('id01');
  762. var signup = document.getElementById('id02');
  763. window.onclick = function(event) {
  764. if (event.target == login) {
  765. login.style.display = "none";
  766. }
  767. else if (event.target == signup){
  768. signup.style.display = "none";
  769. }
  770. }
  771.  
  772. var password = document.getElementById("password");
  773. var confirm_password = document.getElementById("confirm_password");
  774. function validatePassword(){
  775. if (password.value != confirm_password.value){
  776. confirm_password.setCustomValidity("Passwords Don't Match");
  777. }
  778. else{
  779. confirm_password.setCustomValidity('');
  780. }
  781. }
  782. password.onchange = validatePassword;
  783. confirm_password.onkeyup = validatePassword;
  784.  
  785. function shiftEXT(){
  786. document.getElementById('tip').style.marginTop = "560px";
  787. }
  788.  
  789. function shiftBack(){
  790. document.getElementById('tip').style.marginTop = "530px";
  791. }
  792. </script>
  793. </header>
  794. <section>
  795. CV - Builder
  796. <div class="intro">
  797. Welcome to CV - Builder ,our application allows you to<br> build / create, update and download your professional CV / Resume <br>in PDF within minutes, for Free!
  798. </div>
  799. </section>
  800. <div id="tip">
  801. Resume Builder makes it fast and easy to create the powerful, professional
  802. resume hiring managers are looking for..<br>Create a professional resume in 5 minutes.
  803. </div>
  804. <footer>
  805. <div class="f1">&copy 2017 CV - Builder</div>
  806. </footer>
  807. </body>
  808. </html>
  809.  
  810. //login.php//
  811.  
  812. <?php
  813. session_start();
  814.  
  815. $host ='localhost';
  816. $user = 'root';
  817. $pass = '';
  818. $db = 'authentication';
  819.  
  820. $con = mysqli_connect($host, $user, $pass, $db);
  821.  
  822. if (isset($_POST['login_btn'])){
  823. $username = mysqli_real_escape_string($con,$_POST['username']);
  824. $password = mysqli_real_escape_string($con,$_POST['password']);
  825.  
  826. $password = md5($password);
  827. $sql = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
  828. $result = mysqli_query($con, $sql);
  829.  
  830. if (mysqli_num_rows($result) == 1) {
  831. header("location: home.php");
  832. }else{
  833. header("location: error.php");
  834. }
  835. }
  836. ?>
  837.  
  838. //signup.php//
  839. <?php
  840. session_start();
  841.  
  842. $host ='localhost';
  843. $user = 'root';
  844. $pass = '';
  845. $db = 'authentication';
  846.  
  847. $con = mysqli_connect($host, $user, $pass, $db);
  848.  
  849. if (isset($_POST['sign_btn'])){
  850. /*$username = mysqli_real_escape_string($con, $_POST['username']);
  851. $password = mysqli_real_escape_string($con, $_POST['password']);
  852. $cpassword = mysqli_real_escape_string($con, $_POST['cpassword']);
  853. $email = mysqli_real_escape_string($con, $_POST['email']);
  854. $cont_num = mysqli_real_escape_string($con, $_POST['cont_num']);*/
  855.  
  856. $username = $_POST['username'];
  857. $password = $_POST['password'];
  858. $cpassword = $_POST['cpassword'];
  859. $email = $_POST['email'];
  860. $cont_num = $_POST['cont_num'];
  861.  
  862. $password = md5($password);
  863. $sql = "INSERT INTO users(username, password, email, cont_num) VALUES('$username', '$password', '$email', '$cont_num')";
  864. mysqli_query($con, $sql);
  865. header("location: home.php");
  866. }
  867. ?>
  868. // 2 .jpg files 1 ico file and 1 qtf font family file //
Add Comment
Please, Sign In to add comment