Jump to content

warrens0017

Members
  • Content Count

    16
  • Joined

  • Last visited

Everything posted by warrens0017

  1. Hi everyone, I am running into an issue when I am sending out emails using the mail() function. What I am trying to do is on one page, there is a text area that enters information into a form and sends it to another php to process. Here is the form: <form method='POST' action='../home/contact-send-email.inc.php'> <div class='input_form'> <input type='hidden' name='cid' value='".$rowcon['cid']."'><br> <input type='hidden' name='from' value='".$_SESSION['email']."'><br> <input type='hidden' name='email' value='".$rowcon['email'].
  2. I was able to figure it out and also prevent SQL injection.
  3. Hello everyone, I am running into an issue now to where I am trying to get information from a database but it is only happening when there is an apostrophe in the text. Meaning things, getting the data from the database, there is a word with an apostrophe in it. I get all the information from the start up to the point where the apostrophe is at. For example: The cat can't jump over water. What I will get is this: The can can Then I don't get the rest of my data. Here is the code I am dealing with. Any help would be great. $id = $_POST['id']; $title = $
  4. It had to be BOM. I just deleted the file and recreated it with using just work and then copied and pasted it into a bran new accedit.php page. IDK why my editors were not able to detect the BOM but that was is. Thank you all for the help.
  5. I used Visual Studios, NotePad++, Sublime Text; All of them show that there is no UTF-8 BOMs.
  6. I just verified that all the inc files do NOT have the session_start(). Yes this is at the VERY TOP before all HTML tags. Yes there is no line break.
  7. Good day everyone, I am running into this error: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/.../accedit.php:1) in /home/.../accedit.php:2"; i have looked it up but all I am getting is there is white space that is causing this issue. This is the top part of this code: <?php session_start(); include '../inc/inc.php'; ?> Here is the inc.php: <?php include "../inc/dbh.php"; include '../inc/header.php'; include '../inc/bg_img_page.php'; include '../inc/nav.php'; include 'info_get.php'; include 'info_
  8. Hi everyone, Have been working with video backgrounds and everything is going great. I have surfed the web and I have been trying to find out how to display an image after a video plays. I know how I can do a poster image before a video plays, I want a poster image to be displayed after the video is done. Now I don't know where I need to post this so I figure I start here. I will post my code down below so you can take a look at what I already have. Thanks in advance! <video onloadstart='this.volume=0.3' id='bg-video-index' onclick='playVideo' autoplay> <source src='me
  9. Hi everyone, I need a little help with trying to figure out what I need to do. I am writing an IF statement that allowed only certain users can see. So what I am trying to do, in my DB i have it created that if you are going to have certain access, the value in the DB is set to '1' for true. What I need help with is seeing how I can write and IF statement that reads that value and allows the user to see it. This is the current code I have: <?php if (isset($_SESSION['id'])) { echo "Welcome"; } else { echo "You not logged in or don't have access."; } ?> With t
  10. Ahhhh....I see it. I had to move around the <form> before the getNote().
  11. <?php if (isset($_SESSION['id'])) { echo "<table id='Table_note'>"; echo "<tr class='noteTable'>"; echo "<th>Notes</th>"; echo "<th></th></tr>"; getNote($conn); echo "</table><br>"; echo "<form method='POST' action='".setNote($conn)."'> <input type='hidden' name='id' value='".$_SESSION['id']."'> <input type='hidden' name='date' value='".date('Y-m-d')."'> <textarea name='note'></textarea><br>
  12. See now I understand that but I have something very similar to the code that i wrote. BUT, with the other code that is not different in anyway, I can submit a text to the database, and have it come write back out without any errors. I did find out that with the code above that I can send one thing to the database and get it back without any issues, it only when I am trying to send more information to the database that I get the error. And that is where I am at and I am confused. That a very similar code work but not this one.
  13. Hi, I am having an issue with a warning that keeps popping up. I have edited the line it is saying but still getting the error. Warning: Cannot modify header information - headers already sent by (output started at /Pages/Forums/comments.php:227) in /Pages/Forums/comments.php on line 88 Here are the two lines that the warning is saying function setNote($conn) { if (isset($_POST['NoteSubmit'])) { $id = mysqli_real_escape_string($conn, $_POST['id']); $date = mysqli_real_escape_string($conn, $_POST['date']); $note = mysqli_real_escape_string($conn, $_POST
  14. Okay one more thing and I should be good. I got all that fixed and worked out, but now I am trying to create a login and I am getting this error: Warning: mysqli_fetch_assoc() expects parameter 1 to be resource, boolean given in Here is the code that I am working with: login.php <?php include 'dbh.php'; $uid = $_POST['uid']; $pwd = $_POST['pwd']; $sql = "SELECT * FROM username WHERE uid='$uid' AND pwd'$pwd'"; $result = mysqli_query($conn, $sql); if (!$row = mysqli_fetch_assoc($result)) { echo "Username or password is incorrect"; } else { echo "You are
  15. Thank you very much. I read over the code like ten times and didn't notice that.
  16. Hi everyone. So I am have an issue to were I am trying to send information to my database and I get this error: NOTICE: Undefined index This is the code I am using: index.php <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Test Page</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <form action="signup.php" methos="POST"> <input type="text" name="first" placeholder="First Name"><br> <input ty
×
×
  • Create New...