Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2005, 03:16 PM
New kid on the block
 
Join Date: Aug 2005
Location: Penang
Posts: 5
Rep Power: 0
sangasura is on a distinguished road
send parameter

mcm mana nak buat kalu kita nak hantar parameter..cth, kita log in. pastu kita nak bukak user account yg papar semua data yg ada dalam dbase..time log in kita kena hantar skali parameter kan?

$MM_redirectLoginSuccess = "Index2.php?IcNo=<?php echo $row_Student['ICNo']; ?>";

kenapa ada error dlm script ni?
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\apache\htdocs\projek\loginstudent.php on line 28

Last edited by sangasura; 02-09-2005 at 04:24 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-09-2005, 10:38 PM
webber's Avatar
Inspired Webmaster
 
Join Date: Dec 2004
Location: Kuala Lumpur
Posts: 105
Rep Power: 51
webber is on a distinguished road
try this:

PHP Code:
$MM_redirectLoginSuccess "Index2.php?IcNo=".$row_Student['ICNo']; 

note: assuming
PHP Code:
$row_Student['ICNo'
returns url encoded string
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-09-2005, 09:15 AM
New kid on the block
 
Join Date: Aug 2005
Location: Penang
Posts: 5
Rep Power: 0
sangasura is on a distinguished road
dah wat tp still ada error...
Parse error: parse error in c:\apache\htdocs\projek\loginstudent.php on line 179

177 <?php
178 mysql_free_result($Student);
179 ?>

kenapa yek?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-09-2005, 10:44 AM
heterozigot's Avatar
Novice Webmaster
 
Join Date: Jan 2003
Location: PJ
Posts: 51
Rep Power: 73
heterozigot is on a distinguished road
Send a message via ICQ to heterozigot Send a message via Yahoo to heterozigot
$MM_redirectLoginSuccess = "Index2.php?IcNo=".$row_Student['ICNo'];

line ni kompom tak error! yg jadi parse error tu sebab tak cukup tanda { atau } atau tak dak tanda ; atau " atau '

perhatikan btol2...mesti jumpa
__________________
Try and Support Malaysia Product.
http://foto.home.net.my
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-09-2005, 12:35 PM
New kid on the block
 
Join Date: Aug 2005
Location: Penang
Posts: 5
Rep Power: 0
sangasura is on a distinguished road
PHP Code:
<?php
include 'conf.php';

if(
$_POST)

    
$_SESSION['user'] = send_login($_POST['ICNo'],$_POST['Password']);
    if(!empty(
$_SESSION['user']['ICNo']))
    {
        
$_SESSION['user']['auth'] = True;
        
//header("Location: Index2.php");//sekiranya ICNo = Password
        
header("Location: Index2.php?ICNo=".$row_Student['ICNo']);
    }
    else
    {
        
header("Location: LoginFail.php");//sekiranya password n ic no sama sama
    
}
}

function 
send_login($ICNo,$Password)
{
    
$qid mysql_query("select ICNo from dbStudent where ICNo='$ICNo' and Password='$Password'");
    
$data mysql_fetch_array($qid);

    if(!empty(
$data))
    {
        return 
$data;
    }
    else
    {
        return 
false;
    }
}
kenapa kat url tak kluar id user yag log in?
so dia tak leh paparkan database user tersebut

http://localhost/Projek/Index2.php?ICNo=

Last edited by sangasura; 06-09-2005 at 04:19 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-09-2005, 04:31 PM
New kid on the block
 
Join Date: Sep 2005
Location: malaysia
Posts: 1
Rep Power: 0
asmdev is on a distinguished road
cuba
PHP Code:
header("Location: Index2.php?ICNo=".$_SESSION['user']['ICNo']); 
kalau nak guna
PHP Code:
echo $row_Student['ICNo']
// kena
$row_Student $_SESSION['user']; 

Last edited by asmdev; 06-09-2005 at 04:33 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send email through asp? pepsi_blue Website Programming 5 28-06-2007 11:55 PM
Snap, Send & Win !!! lina News and Announcements 0 06-07-2006 12:06 PM
send sms from web-based application chibo Website Design 1 30-11-2005 06:16 PM
ASP Send Mail GMCoolong Website Programming 1 26-04-2005 02:29 PM
send var ciki Website Programming 21 19-02-2004 03:28 PM


All times are GMT +8. The time now is 01:24 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

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