Jump to content

Sorrow

Members
  • Posts

    72
  • Joined

  • Last visited

    Never

Posts posted by Sorrow

  1. Hi i am trying to send a form to an email address but it works at my house but apparently the person i am doing this for says its not working at their home and at work. So this code works at some place. what would i be doing wrong. Here is the form:

    <form method="post" action="envoyez.php"> 
          Nom:<br /> 
      <input name="Nom" type="text"><br>
          
          Courriel:<br /> <input name="Courriel" type="text"><br> 
          Commentaire:<br> 
      <textarea name="Commentaire" rows="15" cols="40"></textarea><br> 
          
      <input type="submit" value="Envoyez"> </form> 
        
    
    

     

    and here the code to send the email:

    
    
    
    <?php
      $Nom = $_REQUEST['Nom'] ;
      $Courriel = $_REQUEST['Courriel'] ;
      $Commentaire = $_REQUEST['Commentaire'] ;
    
      mail( "do@notwork.ca", "Commentaire", $Commentaire, "From: $Courriel" );
    
    ?>
    

     

     

    what am I doing wrong. Because If i send a comment it is working. Can anyone help pls??

  2. Hi everyone. I don't have any problem uploading single/multi files but I was wondering if some one would have an idea on how to upload an entire folder of pics instead of uploading files 1 at a time. I haven't found anything really except how to upload files in a folder.

     

    Any suggestion are appreciated. Thank you

  3. Hi, here is my problem. I have to display 3 cd case with the movie title underneath and they have to be side by side. And with what I have I can only put them one on top of the other .

    <tr>
          <td colspan="2">
             
               
             <?php
    
    include 'opendb.php';
    
    $query  = "SELECT * FROM Trailers Order by T_index DESC LIMIT 0,3 ";
    $result = mysql_query($query);
    
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
        echo "<a STYLE='text-decoration:none' href='/b2.php?index={$row['T_index']}'><img src='{$row['T_Case']}' width='60' height='80' border = '0'>";
        echo "<font size = '2'>{$row['T_Title']}</font></a>";
       
    }
    mysql_close($con);
    
    ?>
    
    </td>
    

     

    This is what I need to have done:

     

     

                  _____          _____          _____

                  |      |        |        |      |        |

                  |      |        |        |      |        |

                  -----          ------        ------

                  Title            Title            Title

     

     

    Thank you

  4. Hi, I am currently buiding a movie website and for my release dates section i want to display the upcomming dvd release but when a date is passed I dont want to display it anymore without deleting it how would I go about that please.

     

    Here is my code for that part

     

    // get the info from the db 
    $sql = "SELECT `relID` , `relTitle` , `relDirector` , `relCase` , `relDate` FROM dvdRelease ORDER BY `relDate` LIMIT $offset, $rowsperpage";
    $result = mysql_query($sql, $con);
    
    //echo "<table bgcolor='#000000' border = '0' cellpadding = '10' cellspacing = '5' >";
    // while there are rows to be fetched...
    while ($list = mysql_fetch_assoc($result)) {
    ?>
    
    
    
    
    <table>
    <tr><td>
    <a href ='<?=$list['relCase']?>' style="outline-color:#000000" ><img src=<?=$list['relCase']?>  height="85" width="65" Border="0"></a></td><td width="25px"></td>
    <td><font color="ff0000"><b> <?=$list['relTitle']?></b>
    <br>Date de Sortie:</font><font color="#FFFFFF"> <?=$list['relDate']?> </font><font color="ff0000">
    <br>Réalisateur(s) : <?=$list['relDirector']?>
    </td></tr></table><br />
    
    </font>
    

  5. Hi, here is my problem. I have to display 3 cd case with the movie title underneath and they have to be side by side. And with what I have I can only put them one on top of the other .

    <tr>
    	<td colspan="2">
    
                
    		<?php
    
    include 'opendb.php';
    
    $query  = "SELECT * FROM Trailers Order by T_index DESC LIMIT 0,3 ";
    $result = mysql_query($query);
    
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
     echo "<a STYLE='text-decoration:none' href='/b2.php?index={$row['T_index']}'><img src='{$row['T_Case']}' width='60' height='80' border = '0'>";
        echo "<font size = '2'>{$row['T_Title']}</font></a>";
    
    }
    mysql_close($con);
    
    ?>
    
    </td>

     

    This is what I need to have done:

     

     

                  _____          _____          _____

                  |      |        |        |      |        |

                  |      |        |        |      |        |

                  -----          ------        ------ 

                  Title            Title            Title

     

       

    Thank you

  6. Ok i got this to work but in my code

    <tr><td colspan = '2'><b>Release Date : </b>{$row['NPReldate']}<br></td></tr>

     

    But What do I replace {$row['NPReldate']} with because I tried {$row['NPReldate']} and  DATE_FORMAT( NPRelDate, ' %M %D %Y' ) also and it is not working

  7. Hi here is my problem. I have a date in my database in the format (2008-11-30) and for each entry that I have in my database when it is displayed on my webpage I need to have it displayed like That (November 30 2008) I have found How to get the format of the date change

    SELECT MONTHNAME(TestDate), DAYOFMONTH(TestDate), YEAR(TestDate) FROM Test 

     

    But I cant figure out how to use it In this code(it has to be at the release date replacing {$row['NPReldate']}) since each entry are displayed one after the other on the same page

    		<?php
    
    include 'opendb.php';
    
    $query  = "SELECT * FROM NowPlaying ORDER BY NPIndex DESC";
    $result = mysql_query($query);
    
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
      echo " 	<font face = 'Verdana'><table width='350' border = '0' cellspacing='5'>
    
    <tr>
      <td width = '300' colspan = '2'><center><b>{$row['NPTitle']}</center> </td></tr><tr><br>
      <td rowspan = '5'><a href = '{$row['NPCase']}'><img src='{$row['NPCase']}' width='125' height='200' border = '0' align='top'></a></td>
    
    <td>
    <tr><td><b>Director :  </b>{$row['NPDirector']}<br></td></tr>
    <tr><td><b>Writers  :  </b>{$row['NPWriters']}<br></td></tr>
    <tr><td><b>Production Company :  </b>{$row['NPStudio']}<br></td></tr>
    <tr><td><b>Actors   : </b>{$row['NPActors']}<br></td></tr>
    <tr><td colspan = '2'><b>Release Date : </b>{$row['NPReldate']}<br></td></tr>
    </td>
    </tr>
    <tr>
    <td width ='300' colspan='2' align='justify'> Plot : ";
    echo nl2br($row['NPPlot']);
    echo "</td></tr><tr><td></td></tr>
    </table><br><br><br></font>
    
    
    ";
    }
    mysql_close($con);
    
    ?>
    

     

    Anyone has any Idea pls Thank you in advance

  8. Ok here is what is happening I am doing a search option and when I click no the search button I need to display the results. it is working great but when there is no result that was found I need to echo "No Item was found"

    Here is the code that I have

     

    include 'opendb.php';
    
    $STitle = $_POST[sTitle];
    $query  = "SELECT * FROM reviews WHERE m_Title like '%$STitle%' ORDER BY m_Title";
    $result = mysql_query($query);
    
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
    if ($row < 1) {
       echo "<br> No titles found<br><br><a href='http://www.web.com/reveiws1.php'> Back to Reviews</a>";
       
    }else { 
    echo "<a href='/moviereview.php?index={$row['m_index']}'>{$row['m_Title']} </a><br>" ;
    }
    }
    
    
    mysql_close($con);
    

     

    Any suggestion on what I am doing wrong please ??

  9. Here I have a Little problem here. I followed a tutorial for pagination and it works great but each entry that I have I would like to have them seperated in different like this example:

    hxxp://www.bloody-disgusting.com/comingsoon.php

    and I can't figure out how to do it any suggestion please?

    Here is my code:

     

    <?php
    include 'opendb.php';
    // find out how many rows are in the table 
    $sql = "SELECT COUNT(*) FROM dvdRelease ";
    $result = mysql_query($sql, $con);
    $r = mysql_fetch_row($result);
    $numrows = $r[0];
    
    // number of rows to show per page
    $rowsperpage = 10;
    // find out total pages
    $totalpages = ceil($numrows / $rowsperpage);
    
    // get the current page or set a default
    if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {
       // cast var as int
       $currentpage = (int) $_GET['currentpage'];
    } else {
       // default page num
       $currentpage = 1;
    } // end if
    
    // if current page is greater than total pages...
    if ($currentpage > $totalpages) {
       // set current page to last page
       $currentpage = $totalpages;
    } // end if
    // if current page is less than first page...
    if ($currentpage < 1) {
       // set current page to first page
       $currentpage = 1;
    } // end if
    
    // the offset of the list, based on current page 
    $offset = ($currentpage - 1) * $rowsperpage;
    
    // get the info from the db 
    $sql = "SELECT * FROM dvdRelease LIMIT $offset, $rowsperpage";
    $result = mysql_query($sql, $con);
    
    echo "<table bgcolor='#000000' border = '0' cellpadding = '10' cellspacing = '5' >";
    // while there are rows to be fetched...
    while ($list = mysql_fetch_assoc($result)) {
       // echo data
       echo "<tr><td width = '450' >";
       echo "Title : " . $list['relTitle'];
       echo "<br>";
       echo "Director(s) : " . $list['relDirector'];
        echo "<br>";
       echo "</td><td width = '300'>";
        echo "Trailer : " . $list['relTrailer'] ;
    echo "<br>";
       echo "Release Date : " . $list['relDate'] ;
       echo "</td></tr>";
    } // end while
    echo "</table>";
    
    echo "<div class= 'dvdPagination' >";
    /******  build the pagination links ******/
    // range of num links to show
    $range = 3;
    
    // if not on page 1, don't show back links
    if ($currentpage > 1) {
       // show << link to go back to page 1
       echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=1'><<</a> ";
       // get previous page num
       $prevpage = $currentpage - 1;
       // show < link to go back to 1 page
       echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage'><</a> ";
    } // end if 
    
    // loop to show links to range of pages around current page
    for ($x = (($currentpage - $range) - 1); $x < (($currentpage + $range) + 1); $x++) {
       // if it's a valid page number...
       if (($x > 0) && ($x <= $totalpages)) {
          // if we're on current page...
          if ($x == $currentpage) {
             // 'highlight' it but don't make a link
             echo " [<b>$x</b>] ";
          // if not current page...
          } else {
             // make it a link
     echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$x'>$x</a> ";
          } // end else
       } // end if 
    } // end for
    
    // if not on last page, show forward and last page links	
    if ($currentpage != $totalpages) {
       // get next page
       $nextpage = $currentpage + 1;
        // echo forward link for next page 
       echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage'>></a> ";
       // echo forward link for lastpage
       echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages'>>></a> ";
    } // end if
    /****** end build pagination links ******/
    echo "</div>";
    ?>
    

  10. Here this is the first 10 line thats in the admin.php

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php
    error_reporting(E_ALL); ini_set('display_errors','1'); 
    session_start();
    
    if(!isset($_SESSION['loggedin'])) {
       header('Location: http://www.xxxxxxxxxxx.com/');
       exit();
    }
    ?>
    

  11. That is the error code I get:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/14/blabla/htdocs/admin.php:2) in /homepages/14/blabla/htdocs/admin.php on line 4

  12. Hi everyone, Here i have a little problem when I'm logging in to my admin CP the session works but sometimes It just doesnt display anything like a blank page even If i am using the right user/pass. Here is the code I have at the top of each page

    <?php
    session_start();
    
    if(!isset($_SESSION['loggedin'])) {
       header('Location: http://www.qwerty.com/admin.php');
       exit();
    }
    ?>

     

    Any ideas on what could be the problem??

     

    And if I have the above code on all the pages that are linked trought my adminCP is it still goin to work??

     

  13. tru that lol sorry secod page code is

    <?php
    $DateRel = $_POST['relMonth'] $_POST['relDate'] ',' $_POST['relYear'];
    include 'opendb.php';
    $sql="INSERT INTO dvdRelease ( 'Release ID' , 'relTitle' , 'relDirector','relTrailer','relCase','relDate' )
    VALUES ('$_POST[dvdTitle]','$_POST[dvdDirector]','$_POST[dvdTrailer]','$_POST[dvdCase]',$DateRel)
    ";
    
    if (!mysql_query($sql,$con))
      {
      die('Error: ' . mysql_error());
      }
    echo "1 Release added";
    
    mysql_close($con)
    ?>
    

     

    everything is working fine except for the date.And how would I be able to do that

    to be storing a date in a database using a DATE data type (yyyy-mm-dd) to
  14. Hello everyone, I have a little issue regarding lists and dates. I have 2 list, 1 for the month and 1 for the day. I am trying to pass the info to another page so I can save it into a database but it just never pass it.

     

    Code from page 1:

    Release Date :<td> Month
    <select name='relMonth' value=''>Select Month</option>
    <option value='01'>January</option>
    <option value='02'>February</option>
    <option value='03'>March</option>
    <option value='04'>April</option>
    <option value='05'>May</option>
    <option value='06'>June</option>
    <option value='07'>July</option>
    <option value='08'>August</option>
    <option value='09'>September</option>
    <option value='10'>October</option>
    <option value='11'>November</option>
    <option value='12'>December</option>
    </select>
    
    Date 
    <select name='relDate' >
    <option value='01'>01</option>
    
    <option value='02'>02</option>
    <option value='03'>03</option>
    <option value='04'>04</option>
    <option value='05'>05</option>
    <option value='06'>06</option>
    <option value='07'>07</option>
    <option value='08'>08</option>
    <option value='09'>09</option>
    <option value='10'>10</option>
    <option value='11'>11</option>
    <option value='12'>12</option>
    <option value='13'>13</option>
    <option value='14'>14</option>
    <option value='15'>15</option>
    <option value='16'>16</option>
    <option value='17'>17</option>
    <option value='18'>18</option>
    <option value='19'>19</option>
    <option value='20'>20</option>
    <option value='21'>21</option>
    <option value='22'>22</option>
    <option value='23'>23</option>
    <option value='24'>24</option>
    <option value='25'>25</option>
    <option value='26'>26</option>
    <option value='27'>27</option>
    <option value='28'>28</option>
    <option value='29'>29</option>
    <option value='30'>30</option>
    <option value='31'>31</option>
    </select>
    
    
    Year(yyyy) <input type=text name='relyear' size=8 >
    
    
    <td><td><input type='submit' align='right' value='Add Release'  />
    

     

    And for the page 2

    <?php
    $DateRel = $_POST['relMonth'] $_POST['relDate'] ',' $_POST['relYear'];
    include 'opendb.php';
    $sql="INSERT INTO dvdRelease ( 'Release ID' , 'relTitle' , 'relDirector','relTrailer','relCase','relDate' )
    VALUES ('$_POST[dvdTitle]','$_POST[dvdDirector]','$_POST[dvdTrailer]','$_POST[dvdCase]',$DateRel)
    ";

  15. Hi everyone . Here i just cant find whats wrong with this query:

     

    "INSERT INTO Release (relTitle,relDirector,relTrailer,relCase,relDate) VALUES ('$_POST[dvdTitle]','$_POST[dvdDirector]','$_POST[dvdTrailer]','$_POST[dvdCase]','$_POST[dvdRelease]')";

  16. Hi everyone. I need to display only the top 3 items of the query when i do this

    <?php
    
    include 'opendb.php';
    
    $query  = "SELECT * FROM reviews Order by m_index DESC ";
    $result = mysql_query($query);
    
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
        echo "<a href='/moviereview.php?index={$row['m_index']}'>{$row['m_Title']}</a><br>";
    
    }
    mysql_close($con);
    
    ?>

     

    its ok it displays every entry but I only need the top 3 and I tried

    SELECT TOP 3 * FROM reviews Order by m_index DESC
    and 
    SELECT TOP 3 FROM reviews Order by m_index DESC

     

    Any idea what am I doing wrong???

×
×
  • 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.