User Profile

Collapse

Profile Sidebar

Collapse
Tinus
Tinus
Last Activity: Dec 17 '10, 08:59 AM
Joined: Jul 29 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Tinus
    started a topic Error with using session

    Error with using session

    Hi

    I am getting thid error
    Code:
    Object reference not set to an instance of an object.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
    
    Source Error:
    ...
    See more | Go to post
    Last edited by jhardman; Dec 18 '10, 12:42 AM. Reason: Accidentally posted in classic asp forum. Moved to asp.net

  • Tinus
    replied to File Uploading to Access Database c#
    never mind.I found the solution.
    See more | Go to post

    Leave a comment:


  • Tinus
    started a topic File Uploading to Access Database c#

    File Uploading to Access Database c#

    Hi
    I followed the example on
    http://www.stardevelop er.com/articles/display.html?ar ticle=200303120 1&page=1

    Code:
    <%@ Page language="c#" Codebehind="defaultfile.aspx.cs" AutoEventWireup="false"
    	Inherits="Stardeveloper.UploadAccess.DefaultForm" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
    
    <html>
    ...
    See more | Go to post

  • Tinus
    replied to Using session variable in sql
    Hi

    I have found the sollution.
    User and password are reserved words in ms access so .
    Code:
    string Firstname=Session["FirstName"].ToString();
      OleDbCommand cmd=Myconnection.CreateCommand();
      cmd.CommandText="select [user].[password] from [user] where [user].[username]='"+Firstname+"'";
    See more | Go to post

    Leave a comment:


  • Tinus
    replied to Using session variable in sql
    Thank you.
    Code:
    <%@ Page Language="C#" Debug="true" %>
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Configuration" %>
    <%@ Import Namespace="System.Xml.Linq" %>
    <%@ Import Namespace="System.Data.SqlClient"%> 
    <%@ Import Namespace="System.Data.OleDb"%>
    ...
    See more | Go to post

    Leave a comment:


  • Tinus
    started a topic Using session variable in sql

    Using session variable in sql

    Hi

    Please help with the follwing:
    This is my testpassword.as px file:

    Code:
    <%@ Page Language="C#" Debug="true" %>
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Configuration" %>
    <%@ Import Namespace="System.Xml.Linq" %>
    <%@ Import Namespace="System.Data.SqlClient"%>
    ...
    See more | Go to post
    Last edited by jhardman; Nov 8 '10, 12:56 PM. Reason: Accidentally posted in the classic asp forum. Moved to asp.net

  • Tinus
    replied to email with multiple attachments
    in PHP
    Thanks for the help.

    It is working now:

    Code:
    $headers = array ('From' => $from,'To' => $to, 'Subject' => $subject);
    $text = 'Text version of email'; // text and html versions of email.
    $html = '<html><body>HTML version of email. <strong>This should be bold</strong></body></html>';
    $file1 = "C:/aptana/xampp-win32-1.7.3/xampp/htdocs/besa/RD_Env_ICV5/Report/MtM_Bond_".date('Ymd',$MyToday)."/"."TRI_FP_difference_".date('Ymd',$MyToday).".pdf";
    ...
    See more | Go to post

    Leave a comment:


  • Tinus
    replied to email with multiple attachments
    in PHP
    Hi

    file1 is being sended as the attatchment.
    I am not sure what you mean with raw headers.
    The headers I can view in the mail is as follow.
    From : me@skl.com
    To:me@skl.com
    subject:Test mime message with an attachment
    See more | Go to post

    Leave a comment:


  • Tinus
    started a topic email with multiple attachments
    in PHP

    email with multiple attachments

    Hi ,I need my php program to send an email with multiple attachments.
    The following code only sends one attatchment even though I am attaching 2 files.

    Code:
    <?php
    require_once "Mail.php"; // PEAR Mail package
    require_once ('Mail/mime.php'); // PEAR Mail_Mime packge
    $thedate="20100907";
    $from = "thinus <167677690@nwu.ac.za>";
    $to = "thinus <1236767690@nwu.ac.za>";
    ...
    See more | Go to post

  • Tinus
    replied to buid filename with concatenation
    in PHP
    Thank you.
    So if I have a file in C:\aptana\xampp-win32-1.7.3\xampp\htd ocs\besa\RD_Env _ICV5\Report\Mt M_Bond_20100826
    named TRI_FP20100826. pdf

    Why is the following giving me the message "file missing in the server"

    Code:
    $thedate="20100826"
    if
     (file_exists("C:/aptana/xampp-win32-1.7.3/xampp/htdocs/besa/RD_Env_ICV5/Report/MtM_Bond_".$thedate."/"."TRI_FP".$thedate."pdf")==false)
    ...
    See more | Go to post

    Leave a comment:


  • Tinus
    started a topic buid filename with concatenation
    in PHP

    buid filename with concatenation

    Hi

    I need to click on a button that will download a file.
    The problem is how I will indicate a filename.

    Files are stored in folders tcp20100220,tcp 20100220.
    It depends on a date given by the user.The file in the folder will be named in the same way but will be a pdf file.(tcp201002 20.pdf)

    1 .A form is given to the user where he/she enters a date.Then a file is generated in the specific folder....
    See more | Go to post
    Last edited by Niheel; Sep 29 '10, 08:52 AM.

  • Tinus
    replied to how to use php date in mysql query
    in PHP
    :) Thank you for the help.It's working now.
    See more | Go to post

    Leave a comment:


  • Tinus
    replied to how to use php date in mysql query
    in PHP
    Ok,thanks

    How should I do it then ?

    Code:
    echo $_POST["inputdate"];
    $indate=$_POST["inputdate"];
    echo " indate is".$indate;
    if (isset($_POST["inputdate"])){ 
    $MyToday=date("Ymd");
    $MyToday=strtotime($indate);}
    else{
    $MyToday=$today;}
    
    if((date("D",$MyToday))=='Fri') 
       {
       	$add2days=strtotime(date("Ymd",$MyToday).
    ...
    See more | Go to post

    Leave a comment:


  • Tinus
    replied to how to use php date in mysql query
    in PHP
    Hi

    well, I have a mysql table in which all public holidays are stored.
    A date is entered into an html form. Then my php tests if this day is a holiday.
    In this specific section; it looks if the public holiday is on a sunday. If it is monday will be a holiday .

    What I am actually asking is if the following will return a result or will it return an error, or empty result.
    Code:
    $query2 = "SELECT `daydate`
    ...
    See more | Go to post
    Last edited by Dormilich; Sep 27 '10, 09:43 AM. Reason: spelling

    Leave a comment:


  • Tinus
    started a topic how to use php date in mysql query
    in PHP

    how to use php date in mysql query

    Hi

    I need to run a query based on a php date variable.

    Code:
    $add2days=strtotime(date("Ymd",$MyToday). "+2 day");
    echo".....date(add2days)=".date('Y-m-d',$add2days)
    
    $query2 = "SELECT `daydate` FROM publicholiday WHERE `daydate`=`date('Y-m-d',$add2days)`";
    $aresult = $dbLink->query($query2);  
    	//$resultrow = $aresult->fetch_row();
    ...
    See more | Go to post

  • Tinus
    replied to sending mail in php problem
    in PHP
    Thanks for the reply

    My php file looks as follow and I have also changed sendmail.ini:

    Code:
    $from_name = "BESAWEB";
    $from_email= "1232690@nwk.ac.za";
    $headers   = "From: $from_email";
    $body      = "Hi, \n This is a test mail from $from_name <$from_email>.";
    $subject   = "Test mail from besa";
    $to        = "1232690@nwk.ac.za";
    ...
    See more | Go to post

    Leave a comment:


  • Tinus
    replied to sending mail in php problem
    in PHP
    Hi Jking

    Yes,also nothing in spam.
    Line 6 has been changed to
    if (mail($to,$subj ect,$body,$head ers))

    But it is still not working.
    See more | Go to post

    Leave a comment:


  • Tinus
    started a topic sending mail in php problem
    in PHP

    sending mail in php problem

    Dear friends

    I am trying to sendd a mail from my php code:
    php gives a message that the mail was send successfully but nothing is actually sended.("i receive nothing")

    Thanks you for the help!

    Code:
    $to = "bbesa@aol.com";
    $subject = "BWI SHARE RESULTS!";
    $body = $theData;
    $from="bbesa@aol.com";
    $headers = "From: .$from";
    ...
    See more | Go to post

  • The download section does provide the user with question on if he would like to open or save the file.(which is downloaded from the DB)

    Thanks for the help.

    I have changed the code to upload the file to database and store the file in a directory(not download from DB) and it's doing what I wanted.
    See more | Go to post

    Leave a comment:


  • Hi
    Thanks for the reply.
    I dont want the file in the database to be overwritten.
    I want the file that is stored in the specific directory on the server.

    1.File upload to database.
    2.Store file in directory on pc
    3.Do things with the file in /weqw/wer/..

    Nxt time a file is uploaded
    1.strore in db
    2.overwrite file thatwas previously downloaded to directory.
    3. do some stuff with...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...