Results 1 to 13 of 13

Thread: script

  1. #1
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    194

    script

    ini file : admin.approve.member.php

    <?php
    include ('Connections/star.php');// file yg ada conn to dbase nyer script.


    $sql_check = mysql_query ("SELECT * FROM user_mgt_temp");
    $num_rows = mysql_num_rows ($sql_check);

    if ($num_rows == 0)
    {
    echo 'Tiada permohonan yang perlu disahkan';
    }
    else
    {
    while($row = mysql_fetch_array($sql_check))
    {
    $user_id = $rows["user_id"];
    $user_name = $row["user_name"];
    $user_pword = $row["user_pword"];
    $user_hint_pword = $row["user_hint_pword"];
    $user_fullname = $row["user_fullname"];
    $user_email = $row["user_email"];
    $user_startdate = $row["user_startdate"];
    $user_finishdate = $row["user_finishdate"];
    $user_status = $row["user_status"];
    }
    }
    ?>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>

    <p align="center">Borang Pengesahan Ahli allSTARian.net</p>
    <table width="350" border="0" align="center" cellpadding="0" cellspacing="1">
    <form name="approveform" action="../approvedmembership.parse.php" method="post">
    <tr>
    <td width="192">Nama Pengguna</td>
    <td width="182"><?php echo $user_name; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Katalaluan</td>
    <td><?php echo $user_pword; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Katakunci bagi Katalaluan</td>
    <td><?php echo $user_hint_pword; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Nama Penuh</td>
    <td><?php $user_fullname; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Emel Pengguna</td>
    <td><?php echo $user_email; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Tahun Masuk</td>
    <td><?php echo $user_startdate; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Tahun Keluar</td>
    <td><?php echo $user_finishdate; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>Status STAR</td>
    <td><?php echo $user_status; ?>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><input name="mohon" type="submit" id="mohon" value="Sah"></td>
    </tr>
    </form>
    </table>
    </body>
    </html>

    ini plak file approvedmembership.parse.php
    <?php

    require_once('Connections/star.php');



    $user_name = $_POST['user_name'];
    $user_pword = $_POST['user_pword'];
    $user_hint_pword = $_POST['user_hint_pword'];
    $user_email = $_POST['user_email'];
    $user_fullname = $_POST['user_fullname'];
    $user_startdate = $_POST['user_startdate'];
    $user_finishdate = $_POST['user_finishdate'];
    $user_status = $_POST['user_status'];

    /* Strip any slashes in case user entered any esacped char */
    $user_name = stripslashes($user_name);
    $user_pword = stripslashes($user_pword);
    $user_hint_pword = stripslashes($user_hint_pword);
    $user_email = stripslashes($user_email);
    $user_fullname = stripslashes($user_fullname);
    $user_startdate = stripslashes($user_startdate);
    $user_finishdate = stripslashes($user_finishdate);
    $user_status = stripslashes($user_status);

    //Check in the dbase whether username exist , if does user must enter other username

    $insert_value = mysql_query("INSERT INTO user_mgt
    (user_id,
    user_name,
    user_pword,
    user_hint_pword,
    user_email,
    user_fullname,
    user_startdate,
    user_finishdate,
    user_status)
    VALUES
    ('',
    '$user_name',
    '$user_pword',
    '$user_hint_pword',
    '$user_email',
    '$user_fullname',
    '$user_startdate',
    '$user_finishdate',
    '$user_status')")
    or die (mysql_error());
    if(!$insert_value)
    {
    echo 'Cannot insert to dbase';
    }
    else
    {
    echo 'Value Added into user_mgt!';

    $userid = mysql_insert_id();

    $subject = "Your Membership at allSTARian.net";
    $message = "Dear $fullname,
    Thank you for registering at allSTARian.net, http://www.allstarian.net!
    You are two steps away from logging in and accessing our exclusive
    members area.

    To activate your membership,
    Please click here :
    http://www.allstarian.net /activate.php?id=$userid&code=$user_pword

    Once you activate your membership, you will be able to login with the
    following information,

    Username : $user_name
    Password : $user_pword

    Thanks!
    The Webmaster

    This is automated response, please do not reply!";

    mail($user_email,$subject,$message);


    }

    $del_user_temp = mysql_query("DELETE FROM user_mgt_temp WHERE user_id = $userid");

    ?>

    error yg kuar plak :
    Fatal error: Failed opening required 'Connections/star.php' (include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in c:\phpdev\www\star\admin\admin.approve.member.php on line 2

  2. #2
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    249
    File not found or Path error at Line:
    include ('Connections/star.php');

    check again the path, and it is case sensitive.

  3. #3
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    233
    where is ur "Connections/star.php"; ?

    it'z on

    1) c:\phpdev\www\star\admin\Connections\star.php

    or

    2) c:\phpdev\www\star\Connections\star.php

    if #1 just pust the '..' at ur from include eg ("../Connections/star.php");
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  4. #4
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    betul ke nama file connection tuh star.php? bintang.php?
    aku rasa.. ada kebarangkalian benarnya lebih kepada "START.php".

    agaknya camtuh laa logiknya

    PHP Code:
    <?php 
    include ('Connections/start.php');// start.php or star.php?
    ?>
    -------------- error message -----

    Fatal error: Failed opening required 'Connections/star.php' (include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in c:\phpdev\www\star\admin\admin.approve.member.php on line 2

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

    fail star.php gagal dibuka. dir tak kena.

    selain tuh penggunaan slash dan dot syntax =
    example :
    ../../file.php
    ../file.php here..

    aku pun selalu jadi camnih.. tambah plak kalau file tuh berada difolder yang berlainan antara satu sama lain.. jadi ada baiknya setkan var utk $rootdir contohnya.. then masukkan full url.

    tah ler.. lama dah tak menghadap php.. tanya MHR.. tiap2 hari dia makan php. :P

  5. #5
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    249
    I think should be:
    include ('../Connections/start.php');

    A database connection file use 'STAR' as filename is rather weird. :P

    btw, additional to hymns' reply:
    if, the file is at c:\phpdev\www\star\Connections\star.php
    Then use,
    include ('../../Connections/star.php');

  6. #6
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    214
    *** offtopic

    ni STAR = Sekolah Tuanku Abdul Rahman Ipoh punya ke? ke STAR lain?

  7. #7
    Join Date
    Jun 2003
    Location
    malaysia
    Posts
    315
    Rep Power
    205
    huk aloh ko nie...
    ...aku takleh tulung ler...koz aku b'ngap bab php...ihik2

  8. #8
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    233
    hehehe pulak dah...
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  9. #9
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    194
    btul la tu...
    STAR = Sekolah Tuanku Abdul Rahman, Ipoh

    aku tgh wat portal tuk skola tu.. praktikal nyer projek... apsal ko dak skola tu ke?
    To follow the path:
    Look to the master,
    Follow the master,
    Walk with the master,
    See through the master,
    Become the master.

  10. #10
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    194
    pasal probaku tu.. aku dah discover dah.. aku nyer mysql corrupt. thanks to moderator bazet.geo sbb tulong aku... neway, thanks gak sbb korg berusaha nak bgth aku apa solution to my prob tu.. syukran!
    To follow the path:
    Look to the master,
    Follow the master,
    Walk with the master,
    See through the master,
    Become the master.

  11. #11
    Join Date
    Sep 2001
    Location
    epox
    Posts
    432
    Rep Power
    227
    eh, bazet idup lagi?
    Munzir + "/^[Hh](a)(z)\1\2[iI]$/"

  12. #12
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    233
    hurm... ye ke? xde pun paste...

    ingat dah selamat tadi
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  13. #13
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    233
    hurm... ye ke? xde pun post...

    ingat dah selamat tadi
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Matrimonial Script with new feature, shaadi.com clone script
    By sahil101 in forum Website Programming
    Replies: 1
    Last Post: 14-10-2009, 01:23 PM
  2. [WTS]MLM FULL SCRIPT, FULL MLM Script, easy to configure...
    By chardoz in forum Site, Domains and Links Marketplace
    Replies: 1
    Last Post: 10-12-2008, 12:39 AM
  3. How To Convert Shell Script to Batch Script
    By nana86 in forum Website Programming
    Replies: 0
    Last Post: 20-07-2007, 10:04 AM
  4. Help Me With My First Php Script !!!!
    By mya in forum Website Programming
    Replies: 17
    Last Post: 24-01-2004, 06:12 PM
  5. my script can't run..why?
    By therion in forum Website Programming
    Replies: 7
    Last Post: 23-10-2003, 05:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112