Jump to content

aebstract

Members
  • Posts

    1,105
  • Joined

  • Last visited

Posts posted by aebstract

  1. Here is what I would do, and it allows you to add pages as you wish:

     

    <?php
    
    $action= $_GET['action'];
    
    if (isset($action)) {
    include "$action.php";
    } else {
    include "home.php";
    }
    
    ?>

     

    Make your link just as you stated, then it will set action from the url as a variable "$action". From that you include the correct page, if action isn't set, then it includes a home page. You can do a lot with this basis.

  2. O.O that uploaded the image, it also echoed:

     

    /var/www/vhosts/hillmarketinggroup.com/httpdocs/uploads/civic.jpg

     

    Could you explain what you did to make it work? Thanks a lot for all the help too.

     

     

     

    edit: is there a way to change the file name as it is being uploaded?

  3. see I thought I tryed the full path, I'm not 100% sure on what it is :(

     

     

    I tryed the following:

     

            if (move_uploaded_file($_FILES['thefile']['tmp_name'],  "$_SERVER['DOCUMENT_ROOT']. '/uploads/'".$_FILES['thefile']['name'])) {
    

    Array ( [thefile] => Array ( [name] => civic.jpg [type] => image/jpeg [tmp_name] => /tmp/php2HAf4A [error] => 0 => 102006 ) ) Error

     

     

    I tryed /httpdocs/uploads/ also, which is up there but I don't know how to get my full path?

  4. I have trouble reading other people's code, I don't know why.. it's just the way I have always been. Though I would like to try and explain how I would get this accomplished, and if you think you can do that go for it.

     

    First you would want to grab all information from the first one, then run a while for that query, in the while you should tell it to check the other table for the information given, if it exists do nothing, if it doesn't.. then place the information in (use an if for that). Since you're running it in a while, it should go through and do this for every line untill it is finished.

  5. In your code, just press enter and go to the next line, it will do the same when the email sends out. For example:

     

     

    $body = "this is my body message
    
    
    and this line is down a few";

     

    Doing that should cause space in the email, that has worked for me in the past anyway, so give that a shot and see if you get what you wanted out of it.

  6. Also, after you enter your information, to send an email you will use the following code:

     

    mail ('mailto', 'subject', 'body');

     

    Where mailto is who you want the email sent to, subject is the subject of the email and body is the message sent in the email. Each of those words can be replaced with whatever you choose, including variables that you set. Hope that helps some.

  7. I don't think YOU know what YOU are talking about. I came here with the code already, trying to get it to work. You gave me basically the same code, still not working. So what do you mean by asking me if I have ever tryed to finish it by myself, of course I have. ( before I came to the forums I tryed to write it out and make it work ) That is the reason I am here, I couldn't get it to work on my own. I thought that was obvious and the point of help forums.

     

     

     

     

    If anyone else can help further, that would be greatly appreciated.

  8. Maybe cause I have no clue what you're even talking about and if I came to forums to get help, I don't expect to be told to go figure it out on my own. I figure help forums would help me get the problems fixed, not leave me with them basically where I started at...

  9. Okay well if it was I had a quick way for you to do it with html/css, however.. I do believe you are in the wrong forum anyway. What you are looking for doesn't require php at all. CSS should be the way to do what you are looking for.

     

     

    edit: I just don't personally know how to do it unless it is clickable  :-\

  10. Well I was using the PHP for the world wide web book to make the form, theres a section on it. I went through and checked all that with my php.ini, which can be found at: www.hillmarketinggroup.com/phpinfo.php also they say to use the hidden field for some reason. Even if my file size I am trying to upload is too big, wouldn't the error message display??

  11. Okay I tryed:

     

     

    if (move_uploaded_file ($FILES['thefile']['tmp_name'], "/httpdocs/uploads/{$_FILES['thefile']['name']}")) {

     

    and

     

    if (move_uploaded_file ($FILES['thefile']['tmp_name'], "hillmarketinggroup.com/httpdocs/uploads/{$_FILES['thefile']['name']}")) {

     

    and

     

    if (move_uploaded_file ($FILES['thefile']['tmp_name'], "hillmarketinggroup.com/uploads/{$_FILES['thefile']['name']}")) {

     

     

    none are doing anything, just basically brings me back to the form. What I don't get is why it isn't telling me the reason it isn't uploading. Is there any code I can add on to that line to see if there are any errors coming out of it?

  12. Permissions are set to 777, the folder is uploads which is located in the main directory, same directory as the upload.php file.

     

    1 files and directories in hillmarketinggroup.com / httpdocs / uploads total

     

    Thats the uploads folder found in the directory and upload.php is in httpdocs.

    With all of that said, how is this line wrong?

     

    if (move_uploaded_file ($FILES['thefile']['tmp_name'], "uploads/{$_FILES['thefile']['name']}")) {

     

    I want it in the uploads folder, what would I put in front of uploads, if its in the main dir?

     

  13. Okay that was the problem, thanks for spotting that. Moving along:

     

    I took out the ../ and made a folder called uploads in the same directory that that file is located. I tryed the form, nothing is happening (the error messages aren't saying that it uploaded or errored and nothing is being uploaded)

  14. Uhg sorry, I thought I posted the entire code for the page, and I just put up the php:

    This is what I have..

     

     

     

    upload.php

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>upload mailers</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    
    
    <?php
    ini_set ('display_errors', 1);
    error_reporting (E_ALL & ~E_NOTICE);
    
    if (isset ($_POST['submit'])) {
    
    if (move_uploaded_file ($FILES['thefile']['tmp_name'], "../uploads/$_FILES['thefile']['name']}")) {
    
    	print 'Your file has been uploaded.';
    
    } else {
    
    	switch ($_FILES['thefile']['error']) {
    	   case 1:
    	   	print 'The file exceeds the upload_max_filesize setting in php.ini';
    		break;
    	   case 2:
    	   	print 'The file exceeds the MAX_FILE_SIZE setting in the HTML form';
    		break;
    	   case 3:
    	   	print 'The file was only partially uploaded';
    		break;						
    	   case 4:
    	   	print 'No file was uploaded';
    		break;
    	}
    }
    }
    
    ?>
    
    
    
    <form action="upload.php" enctype="multipart/form-data" method="post">
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    <input type="file" name="thefile" />
    <input type="submit" value="upload" />
    </form>
    
    
    </body>
    </html>
    

     

     

    The page being blank IS the problem. The form isn't showing up?

  15. Hello,

    I am trying to write a simple upload script, I will be making it a lot more involved later on, for now I just want it to work. The php code seems to cause nothing on the page to display:

     

    upload.php

    <?php
    ini_set ('display_errors', 1);
    error_reporting (E_ALL & ~E_NOTICE);
    
    if (isset ($_POST['submit'])) {
    
    if (move_uploaded_file ($FILES['thefile']['tmp_name'], "../uploads/$_FILES['thefile']['name']}")) {
    
    	print 'Your file has been uploaded.';
    
    } else {
    
    	switch ($_FILES['thefile']['error']) {
    	   case 1:
    	   	print 'The file exceeds the upload_max_filesize setting in php.ini';
    		break;
    	   case 2:
    	   	print 'The file exceeds the MAX_FILE_SIZE setting in the HTML form';
    		break;
    	   case 3:
    	   	print 'The file was only partially uploaded';
    		break;						
    	   case 4:
    	   	print 'No file was uploaded';
    		break;
    	}
    }
    }
    
    ?>
    

     

    www.hillmarketinggroup.com/upload.php

     

    If anyone can tell me what is wrong/causing this that would be great. Also, I am not sure if this does it or not, but I will be wanting to change the filename when it is uploaded. That is possible, right?

    Thanks!

  16. I have a website that I am working on and I need to get it so that when the content exceeds the length of the nav, the container of the entire site has a background color the same as the content. Right now the content is going really long for some reason, I just want it all to flatten out at the same spot. I'll post the index and css files and hopefully someone can get me some help quickly.

    index.php
    [code]<?php
    $menu = $_GET['menu'];

    if (isset($menu)) {
    include ("$menu.php");
    } else {
    include ("home.php");
    }

    ?>
    <html>
    <head>
    <title>Mark's coins & jewlery</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="misc/stylesheet.css" rel="stylesheet" type=text/css title=default />
    </head>
    <body>
    <div id="container">
     
    <div id="left">
        <div id="flashbg">
          <div id="flash">
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="206" height="171">
              <param name="movie" value="misc/movie.swf">
              <param name="quality" value="high">
              <embed src="misc/movie.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="206" height="171"></embed>
            </object>
          </div>
        </div>
        <div id="nav"><br />
          <img src="misc/ladiesjewlry.jpg" /><br />
          <div id="nav2">
            <ul>
              <li><a href="index.php?menu=lrings">Ladies Rings</a> </li>
              <li><a href="index.php?menu=lnecks">Ladies Necklaces</a> </li>
              <li><a href="index.php?menu=lwatches">Ladies Watches</a> </li>
              <li><a href="index.php?menu=lbpp">Ladies Brooches, Pins & Pendents</a>
              </li>
              <li><a href="index.php?menu=lbracelets">Ladies Bracelets</a> </li>
              <li><a href="index.php?menu=purses">Purses</a> </li>
              </ul>
    </div>
          <img src="misc/mensjewlry.jpg" /><br />
          <div id="nav2">
            <ul>
          <li><a href="index.php?menu=mrings">Mens Rings</a> </li>
          <li><a href="index.php?menu=mchains">Mens Chains</a> </li>
          <li><a href="index.php?menu=mbracelets">Mens Bracelets</a> </li>
          <li><a href="index.php?menu=mwatches">Mens Watches</a> </li>
          <li><a href="index.php?menu=mpendents">Mens Pendents</a> </li>
              </ul>
    </div>
          <img src="misc/coins.jpg" /><br />
          <div id="nav2">
            <ul>
          <li><a href="index.php?menu=goldeagles">Gold Eagles</a> </li>
          <li><a href="index.php?menu=silvereagles">Silver Eagles</a> </li>
          <li><a href="index.php?menu=morgandollars">Morgan Dollars</a> </li>
          <li><a href="index.php?menu=peacedollars">Peace Dollars</a> </li>
          <li><a href="index.php?menu=othercoins">Other Coins</a> </li>
              </ul>
    </div>
          <img src="misc/crystalandcollectible.jpg" /><br />
          <div id="nav2">
            <ul>
          <li><a href="index.php?menu=lalique">Lalique</a> </li>
          <li><a href="index.php?menu=versace">Versace</a> </li>
          <li><a href="index.php?menu=antique">Antique</a> </li>
              </ul>
    </div>
        </div>
    </div>


    <div id="right">
        <div id="logo">
          <center>
            <img src="misc/logo.jpg" />
          </center>
        </div>

        <div id="redbar"> </div>

        <div id="content">
          <?php
    echo "$content";
    ?>
        </div>
    </div>
    </div>
    </body>
    </html>
    [/code]


    stylesheet
    [code]html {
    height: 100%;
    }

    body {
    background-image: url(bg.jpg);
    padding: 0px;
    margin: 0px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size:10px;

    }

    #container {
    background-color: #FBFBFB;
    height: 100%;
    width: 648px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    }

    html #container {
    height: 100%;
    }

    #left {
    float: left;
    width: 223px;
    height: 100%;
    background-color: #FBFBFB;
    }


    #flashbg {
    position: relative; left: 0px; top: 0px;
    width: 223px;
    height: 190px;
    background-image: url(flashbg.jpg);
    }

    #flash {
    position: absolute; left: 7px; top: 7px;
    width: 206px;
    height: 171px;
    }

    #nav {
    position: relative; left: 0px; top: 0px;
    width: 223px;
    background-image: url(navbg.jpg);

    }


    #right {
    float: right;
    width: 425px;

    }

    #logo {
    position: relative; left: 0px; top: 0px;
    width: 425px;
    height: 59px;
    background-color: #000000;
    }

    #redbar {
    position: relative; left: 0px; top: 0px;
    width: 425px;
    height: 31px;
    background-color: #9b0505;
    }

    #content {
    position: relative; left: 0px; top: 0px;
    height: 100%;
    width: 425px;
    background-color: #FBFBFB;
    }





    nav2 {
    width: 150px;
    padding: 0 0 1em 0;
    margin-bottom: 1em;
    }

    ul {
    list-style: none;
    margin-left: 0;
    padding-left: 1em;
    }
    #nav2 li a {
    display: block;
    color: #000;
    text-decoration: none;
    width: 90%;
    }
    #nav2 li a:hover {


    background-color: #2586d7;
    color: #fff;
    }[/code]


    Thanks

    http://ween.net/markscoinsandjewlery/

    edit!
    Take a look at the home page that you get sent to upon going to the website, the content goes past the background of the content section. Please help!
×
×
  • 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.