Jump to content

gilespatrickson

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by gilespatrickson

  1. Hello and thanks in advance for the input. I a fully functioning form. I am validating the input and successfully inserting the input into the mysql database. Now I am trying to escape the data by adding the basic line of code: $name = mysql_real_escape_string($_POST['name']); The input is successful but the mysql_database for name field is empty. If I remove the above line of code and just input the value for $name (without escape) the update works great. So the question is obvious for the above. Why?
  2. The restaurants have a table and the menus for each restaurant will need to be listed in another table. My question is whether I should create a table for each restaurant's menu or create one table and list all the restaurants menu items in that table with a restaurant_id to signify which items belong to each restaurant.
  3. I am creating a site where restaurants can list their own menus. My question is this. Each restaurant will have its own menu. They will have several items on their menu. Would it be better create a separate table dynamically for each restaurant or just have one menu table and display menu items by the restaurant id? Thanks!
  4. I am uploading files to my server and recording the file information and path in mysql database. I will have different users that will be uploading files. Is there a way that I can set permissions on that folder so that it can only be accessed by a php file from within the program. Or......would it be better to just upload the files to a blob and set permissions that way? Thanks in advance!
  5. I am creating a Project management program. Is there a way that I can use PHP to create a directory (folder) so that I can assign a new folder for each user? Thanks in advance.
  6. I am going to allow users to upload files to their accounts. Is it better to upload to a directory or to save them in the mysql database? Users can only see their own files. I am thinking that it would be best to use mysql so that I can limit permissions. I would love some thoughts on this. Thanks in advance.
  7. There has to be a more secure way. If you log out of yahoo mail and click the back button it goes to the login screen. Is there a way to remove the cache?
  8. I have a members page. When I log out the script takes me to the login page and will not let me reload any members pages. But if I click back it will let me view previously viewed member pages. Is there a way to fix this? Here is the log out code. <?php $past = time() - 100; setcookie(ID_my_site, gone, $past); setcookie(Key_my_site, gone, $past); header("Location: login.php"); ?> Thanks in advance.
  9. Hello. The script seems to work. What I need to do is remove caching of the variables after the form is sent. Right now when you go back to the page it states "Your mail was sent successfully" every time. Thanks in advance for all the help. <?php $to = "test@yahoo.com"; $subject = "Sub"; $sent = mail($to, $subject, $_REQUEST['body'], $_REQUEST['from']); if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?>
  10. I have tried several different methods. Here is the code that I have now. It prints the data but there are no parapgraphs. I know that I douple spaced when I input the data. Could I have insert the data in a way that did not include the spaces? <?php echo "<br /><br /><br />"; $file = mysql_query("SELECT * FROM content WHERE cont_id = '9'") or die(mysql_error()); $data = mysql_fetch_array($file); print $data['cont_title']; echo "<br /><br />"; $test = mysql_real_escape_string($data['cont_body']); print $test; print "<br /><br />"; echo "Document Source: " . $data['cont_source']; ?>
  11. Hello. I am uploading text data into my mysql database with no problems. I am returning it and displaying it on my webpage. The only issue that I am having is that I am losing my paragraphs. I have two questions. 1. How do I return my data and retain my paragraphs? 2. Does it mater if you copy and past content that contains several paragraphs in the input textarea field? Thanks in advance!
×
×
  • 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.