Solitary
-
Posts
7 -
Joined
-
Last visited
Posts posted by Solitary
-
-
1 kodu es palaboju un ieliku $_SESSION['user_id'] bet man rada tik ciprus ie ar kadu ir registrejies bet ka man panakt , ielikt get_username taja pasa kodaa ??? lai rada Username
Ļoti lūdz saliekat ka vajaga :D vnk es jau pie vinas rindina jau vesalu 1h nemos :D un krievaloda ta vajaka no gramatam neko ipsasi nemaku izlasiit tik saktos unz tom kodejumiem :P
1) $name = $_SESSION['user_id']; 2) <?php echo'' . get_username ( $_SESSION['user_id'] ) . ''?
Pats ilgāk padomaju un sapratu !
$name = get_username($_SESSION['user_id'])
-
Meginaju visadi bet nekas nesanaca !
ka var iesaitit to ka shoutbox nick vieta automatiski liek lietotaja nick un ka poto rada vina nick ar textu ko raktijis
<center> <div id="daddy-shoutbox"> <div id="daddy-shoutbox-list"></div> <br /> <form id="daddy-shoutbox-form" action="demos/jquery-shoutbox/daddy-shoutbox.php?action=add" method="post"> Nick: <input id="<?php echo'' . get_username ( $_SESSION['user_id'] ) . ''?>" type="" name="nickname" /> <br /> Say: <input type="text" name="message" /> <br /> <input type="submit" value="Submit" /><span id="daddy-shoutbox-response"></span> </form> </div> </center>
Vai varat palidzet izlabot ja nav gruti , un iedodiet kadu link kur var pasmelt vairak info pa sho lietu
-
help
in Iesācējiem
parliku uz sava dator web serveri kas nebija ilgi lietots , uz provaidera viss ie ka nakas bet man uz sava pc met kludas saistiba ar MAIL
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in d:\webserver\www\forgot_password.php on line 27
<?php require_once('db.php'); include('functions.php'); include('settings.php'); if ( array_key_exists ( '_submit_check', $_POST ) ) { if($_POST['email']!='' && valid_email($_POST['email'])==TRUE) { $getUser = mysql_query('SELECT ID, Username, Temp_pass, Email FROM users WHERE Email = "'.mysql_real_escape_string($_POST['email']).'"'); if(mysql_num_rows($getUser)==1) { $temp_pass = random_string('alnum', 12); $row = mysql_fetch_assoc($getUser); $query = mysql_query("UPDATE users SET Temp_pass='".$temp_pass."', Temp_pass_active=1 WHERE `Email`='".mysql_real_escape_string($row['Email'])."'"); $headers = 'From: info@netarena.lv' . "\r\n" . 'Reply-To: info@netarena.lv' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $subject = "Password Reset Request"; $message = "Dear ".$row['Username'].", Someone (presumably you), has requested a password reset. We have generated a new password for you to access our website: $temp_pass . To confirm this change and activate your new password please follow this link to our website: ".$url."confirm_password.php?ID=".$row['ID']."&new=".$temp_pass.". Don't forget to update your profile as well after confirming this change and create a new password. If you did not initiate this request, simply disregard this email, and we're sorry for bothering you."; if(mail($row['Email'], $subject, $message, $headers)) { $msg = 'Password reset request sent. Please check your email for instructions.'; } else { $error = 'Failed sending email'; } } else { $error = 'There is no member to match your email.'; } } else { $error = 'Invalid email !'; } } ?>
Neizprotu kur vaina , lietoju appserv-win32-2.4.4a un mekleju php.ini failu vispar nekur neatradu es neko no tam lietam daudz nesaprotu vai varetu palidzet
-
usver --> kas tas par murgu ???
vnk macos nesmejies :P
-
paldies par informāciju . es izmantoju npp.5.0.3.Installer un jaraksa no jauna un jaliek <meta http-equiv="Content-Type" content="text/html; charset=windows-1257" />
ja ieprieks esat sagla bajis ejosu dalu ... ja nee tad viss jaraksta no 0
-
Īsti neko nesaprotu no php :D
Man vajadzēja php lapai salikt ka rada garum zīmes , provēju vairak kārt!
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=windows-1257" /> mysql_query("SET NAMES UTF-8");
Izmēgināju visas kombinācijas nesanāca ,bet lapa strādāja login.php
tad nu es pie php lapas Save As nomainiju no ANSI uz UTF-8 un login.php norādiju
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> mysql_query("SET NAMES UTF-8");
Darbojās garumzīmes ,BET nestrādā session_start
A ja uzliek apakal ANSI tad session_start strādā , a garumzīmes nē , vai man vajaga savādāk panākt , ka iet garum zīmes?
Error rāda tādu
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/netarena/public_html/cup/test/login.php:1) in /home/netarena/public_html/cup/test/login.php on line 19 Warning: Cannot modify header information - headers already sent by (output started at /home/netarena/public_html/cup/test/login.php:1) in /home/netarena/public_html/cup/test/login.php on line 22
login.php
<?php require_once('db.php'); include('functions.php'); include('settings.php'); mysql_query("SET NAMES UTF-8"); if (array_key_exists('_submit_check', $_POST)) { if ( $_POST['username'] != '' && $_POST['password'] != '' ) { $query = mysql_query ( 'SELECT ID, Username, Active FROM users WHERE Username = "' . mysql_real_escape_string ( $_POST['username'] ) . '" AND Password = "' . mysql_real_escape_string ( md5($_POST['password'] ) ) . '"' ); if ( mysql_num_rows($query) == 1 ) { $row = mysql_fetch_assoc ( $query ); if ( $row['Active'] == 1 ) { session_start(); $_SESSION['user_id'] = $row['ID']; $_SESSION['logged_in'] = TRUE; header ("Location: members.php"); } elseif ( $row['Active'] == 0 ) { $error = 'Your membership was not activated. Please open the email that we sent and click on the activation link'; } elseif ( $row['Active'] == 2 ) { $error = 'You are suspended!'; } } else { $error = 'Login failed!'; } } else { $error = 'Please use both your username and password to access your account'; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>-=MGL LAN CUP v2=-</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="css/styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="log"> <?php if(isset($error)){ echo ' <p class="error">' . $error . '</p>' . "\n";}?> </div> <div id="container"> <form class="form" action="<?=$_SERVER['PHP_SELF']?>" method="post"> <input type="hidden" name="_submit_check" value="1"/> <center><font face="Lucida Console" size="4"><b>-=MGL LAN CUP v2=-</b></font></center> <div style="margin-top:12px; margin-bottom:10px"> <img src="images/username.gif" alt="username" border="0" /> <input class="input" type="text" name="username" id="username" size="25" maxlength="40" value="" /> </div> <div style="margin-bottom:6px"> <img src="images/password.gif" alt="password" border="0" /> <input class="input" type="password" name="password" id="password" size="25" maxlength="32" /> </div> <input type="image" name="Login" value="Login" class="submit-btn" src="images/btn.gif" alt="submit" title="submit" /> <br class="clear" /> <br class="clear" /> Nēsi vēl biedrs? <a href="register.php"><font color="#FF99FF">Spied šeit</font></a> lai reģistrētos. <br class="clear" /> Aizmirsi savu paroli? Pieprasi jaunu <a href="forgot_password.php"><font color="#FF99FF">šeit</font></a>. </form> </div> </body> </html>
login: test
pass: test
Rāda error saglabas ar HTMLPad 2008 ar save as UFT-8 http://cup.netarena.lv/test
šeit viss tik bez garumzīmēm un ar ANSI http://cup.netarena.lv/
Lūdzu kāds palīdz un pastāsta kas man būtu jāmaina jālabo ,lai strādatu session_start un Garumzīmes!!
neizpratu citu foruma postus tapec uzrakstiju jaunu ...
HELP Solitary
in Iesācējiem
Posted · Edited by Solitary
Man tāda problēma , ka īsti neizprotu update!
Pievienoju klāt velvienu rinu Uzvards funkciju, strādā bet Vards funkciju nē!
Kā pievienoju vel vienu funkciju klāt , strādā tik pēdējais!
Šajā gadijumā man strādā tikai email un Uzvards , Vards nē , pieliekot vel vienu rindu strādā tikai email un pievienotā jaunā rinda a Vards , Uzvards nestrādā!
Būtu labi , ja palīdzētu atrast vainu , varbūt jadefinē savādāk , es esu iesācējs un neizprotu kur kkas trūkst!
php html KODS
-------------
Atradu vainu!
Bija janorada šadi