Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok dito

Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

help nito mga tol i make .htaccess file to remove the extension file .php in a url.

here's .htaccess file

# BEGIN
<IfModule mod_rewrite.so>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-d
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^.]+)\.php$ $1 [L]
</IfModule>
# END

hindi kasi ito gumagana so i need some help with this...

salamat.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga boss... Pede po ba magtanong?
Nakuha ko lang po kasi itong code na ito.. Para saan po yung
db_select?

Nung kinomment ko siya naka continue na ko sa login..
Ang alam ko sa 1st page ng thread na to ko ito nakuha..
Gusto ko lang po malaman kung para saan yun..

Salamat po!

Tsaka po pala..

Pag nirrun ko yung code..
Laging may "Undefine index: ...."
Ano po kaya yun?

Salamat po!

:salute:

Code:
<?php 

	if(isset($_SESSION['user_id'])) {
		header('location:home.php');
	}

	if($_POST['submit']) {
			
		$username = $_POST['username'];
		$password = $_POST['password'];
		
		// if($db_select) {
			$query = "SELECT * FROM users WHERE username='$username' AND password='$password' LIMIT 1";
			$result_set = mysql_query($query);		
			
			if (mysql_num_rows($result_set) == 1) {
				
				$found_user = mysql_fetch_assoc($result_set);
				$_SESSION['user_id'] = $found_user['id'];
				$_SESSION['username'] = $found_user['username'];
				
				header('location:home.php');
			} else {
				
				$message = 'Username/password combination incorrect.<br />';					
			}
																	
		/*} else {
				$message = "Error.";
		}	*/
		
	} else {
		$username = '';
		$password = '';		
	}

?>
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga boss... Pede po ba magtanong?
Nakuha ko lang po kasi itong code na ito.. Para saan po yung
db_select?

Nung kinomment ko siya naka continue na ko sa login..
Ang alam ko sa 1st page ng thread na to ko ito nakuha..
Gusto ko lang po malaman kung para saan yun..

Salamat po!

Tsaka po pala..

Pag nirrun ko yung code..
Laging may "Undefine index: ...."
Ano po kaya yun?

Salamat po!

:salute:

Code:
<?php 

	if(isset($_SESSION['user_id'])) {
		header('location:home.php');
	}

	if($_POST['submit']) {
			
		$username = $_POST['username'];
		$password = $_POST['password'];
		
		// if($db_select) {
			$query = "SELECT * FROM users WHERE username='$username' AND password='$password' LIMIT 1";
			$result_set = mysql_query($query);		
			
			if (mysql_num_rows($result_set) == 1) {
				
				$found_user = mysql_fetch_assoc($result_set);
				$_SESSION['user_id'] = $found_user['id'];
				$_SESSION['username'] = $found_user['username'];
				
				header('location:home.php');
			} else {
				
				$message = 'Username/password combination incorrect.<br />';					
			}
																	
		/*} else {
				$message = "Error.";
		}	*/
		
	} else {
		$username = '';
		$password = '';		
	}

?>

Sir yung "db_select" based on your code. Variable po siya na nagstore ng action or command para mapili o magamit mo yung database na gusto mong i-access. Tapos siguro kaya po may undefined kasi yung wala ka pa pong "session_start()" na function. Hindi ko pa po na try yung code mo hehe. Sana po nakatulong.


Pero may tanong din po ako. May nakakaalam po ba kung paano po mag implement ng biometrics sa html? Yng kamukha po ng sa NBI pag kinukuhanan ng litrato, pero gusto ko po sana eh sa html page siya naka embed. Kahit po tutorial lang po ok lang po. Maraming maraming salamat po. :)
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

For caching.

Ginagamit ang caching para mapabilis ang pagread ng data at makatipid sa paggamit ng resources.

Kung merong data na madalas i-access at hindi naman ganun kadalas magbago, pwedeng i-save sa cache. Instead na ire-read mo siya kung saan (sa ibang server or from database or from file system), titingnan muna yung cache at dun na lang kukunin kung meron.

thanks sir .... sir paano po ba siya ini-install?, dinownload ko po ung memcache pag extract ko po ang file extension ay ".h" at ".c" ....
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

tanong ko lng po kung paano po magsend ng email from PHP localhost.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Pero may tanong din po ako. May nakakaalam po ba kung paano po mag implement ng biometrics sa html? Yng kamukha po ng sa NBI pag kinukuhanan ng litrato, pero gusto ko po sana eh sa html page siya naka embed. Kahit po tutorial lang po ok lang po. Maraming maraming salamat po. :)

hmm not sure pero eto watch mo tong video na to.

http://www.youtube.com/watch?v=ts33pAIywHs

:yipee:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga boss... Pede po ba magtanong?
Nakuha ko lang po kasi itong code na ito.. Para saan po yung
db_select?

Nung kinomment ko siya naka continue na ko sa login..
Ang alam ko sa 1st page ng thread na to ko ito nakuha..
Gusto ko lang po malaman kung para saan yun..

Salamat po!

Tsaka po pala..

Pag nirrun ko yung code..
Laging may "Undefine index: ...."
Ano po kaya yun?

Salamat po!

:salute:

Code:
<?php

	if(isset($_SESSION['user_id'])) {
		header('location:home.php');
	}

	if($_POST['submit']) {

		$username = $_POST['username'];
		$password = $_POST['password'];

		// if($db_select) {
			$query = "SELECT * FROM users WHERE username='$username' AND password='$password' LIMIT 1";
			$result_set = mysql_query($query);

			if (mysql_num_rows($result_set) == 1) {

				$found_user = mysql_fetch_assoc($result_set);
				$_SESSION['user_id'] = $found_user['id'];
				$_SESSION['username'] = $found_user['username'];

				header('location:home.php');
			} else {

				$message = 'Username/password combination incorrect.<br />';
			}

		/*} else {
				$message = "Error.";
		}	*/

	} else {
		$username = '';
		$password = '';
	}

?>

Base sa code mo. Di ginamit yong $db_select kasi naka.comment. If ikaw yong nag.comment ng lines na yan. Then you must have a connection statement and assigned it to your database.

See documentation on how to connect to database. And assigned that connection to $db_select.

About sa undefined index: ... This probably occurs in your $_POST["submit"]. Add another condition. isset($_POST["submit"]) before the $_POST["submit"] or just the isset will do.

Be careful also with $found_user. Be sure that you have a fields in your table named id and username. Otherwise you may have undefined index also.

All in all; I can find no connection to your database which is I guess the root of all errors and the $_POST["submit"];
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

any idea regarding basic .net?
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Salamat po sir Hakuna and sir Santos!

Aaralin ko pa pong mabuti uli yung codes..
Binibiyak ko lang po kasi eh.. :D

Maraming salamat po sa pag guide..
Sana po di kayo mag sawa.. :salute:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

suggest naman kayo..

anung better gamitin for log in $_SESSION or cookies?

and baka meron po kaung alam ng tutorials ng dreamweaver penge nmn po..



thanks po
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

suggest naman kayo..

anung better gamitin for log in $_SESSION or cookies?

and baka meron po kaung alam ng tutorials ng dreamweaver penge nmn po..



thanks po

Cguro both na lang. Session sa server sya pag close mo ng browser mawawala yung session, Cookies sa client sya ang tagal existence nya base sya binigay mo pag close mo ng browser nandyan parin yung cookies.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

hi question regarding FORMS

hindi ba't importante ang attribe na enctype="multipart/form-data" pag nag upload ng file e.g images ?..

ganito yung problem ko..

* pag inilagay ko yung attribute na yan sa form, hindi ko nafefetch yung data (arrays) ng input type="file" via $_POST
bale pag nag print_r($_POST) ako, kulang na yung arrays specifically yung input type="file"

*pag hindi ko naman inilagay yung attribute.. kompleto na yung array of data ko, kasama na yung value ng input type="file" pero ang problema naman is yung file, hindi sya nacocopy sa server.. parang upload fail pero yung data nya, nafefetch ko naman via $_POST, e.g filename


please help.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

hi question regarding FORMS

hindi ba't importante ang attribe na enctype="multipart/form-data" pag nag upload ng file e.g images ?..

ganito yung problem ko..

* pag inilagay ko yung attribute na yan sa form, hindi ko nafefetch yung data (arrays) ng input type="file" via $_POST
bale pag nag print_r($_POST) ako, kulang na yung arrays specifically yung input type="file"

*pag hindi ko naman inilagay yung attribute.. kompleto na yung array of data ko, kasama na yung value ng input type="file" pero ang problema naman is yung file, hindi sya nacocopy sa server.. parang upload fail pero yung data nya, nafefetch ko naman via $_POST, e.g filename


please help.
Patingin nga ng codes mo...as far as I know...Hindi talaga masasama yung input file sa pag PRINT_R($_POST) mo dahil hindi siya nakalagay sa $_POST na array..nakalagay siya sa $_FILE na array..try mo print_r($_FILE)...
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Code:
<?php 
require_once("include/membersite_config.php");


if(isset($_POST['submitted']))
{

$SafeFile = $_FILES['uplimage']['name'];
$SafeFile = str_replace("#", "No.", $SafeFile);
$SafeFile = str_replace("$", "Dollar", $SafeFile);
$SafeFile = str_replace("%", "Percent", $SafeFile);
$SafeFile = str_replace("^", "", $SafeFile);
$SafeFile = str_replace("&", "and", $SafeFile);
$SafeFile = str_replace("*", "", $SafeFile);
$SafeFile = str_replace("?", "", $SafeFile);

$uploaddir = "uploaded_photos/";
$path = $uploaddir.$SafeFile;

 
    if (move_uploaded_file($_FILES['uplimage']['tmp_name'], $path)){ //IF IT HAS BEEN COPIED...

        //GET FILE NAME
        $theFileName = $_FILES['uplimage']['name'];

        //GET FILE SIZE
        $theFileSize = $_FILES['uplimage']['size'];

        if ($theFileSize>999999){ //IF GREATER THAN 999KB, DISPLAY AS MB
            $theDiv = $theFileSize / 1000000;
            $theFileSize = round($theDiv, 1)." MB"; //round($WhatToRound, $DecimalPlaces)
        } else { //OTHERWISE DISPLAY AS KB
            $theDiv = $theFileSize / 1000;
            $theFileSize = round($theDiv, 1)." KB"; //round($WhatToRound, $DecimalPlaces)
        }
		
$path1 = $uploaddir.$theFileName;

  echo "<font color=\"#009900\"><b>Upload Successful</b></font></td>";
	echo "PATH : ".$path1;    
	echo "<script type='text/javascript'>var fl = document.forms['reg_form']['uplimage']; fl.value = ".$path1."</script>";

//$_SESSION['$path1'] = $path1;
    } else {
echo "<script type='text/javascript'>alert('".$path1."');</script>";
//echo "errror, ";
    }
 



    if($fgmembersite->RegisterUser())
   {
        $fgmembersite->RedirectToURL("thank-you.html");
   }
}
else {
 }
 
 
 
print_r($_FILES );


 
		 
	 
		<div id="form_">
					<form enctype="multipart/form-data" class="form-horizontal" id="reg_form" name="reg_form1" method="post" accept-charset="UTF-8" action='<?php  echo $fgmembersite->GetSelfScript(); ?>' novalidate>
					<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
					<input type='hidden' name='submitted' id='submitted' value='1'/>

					<div class='short_explanation'>* required fields</div>
					<input type='text'  class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>' />

					<div><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span></div>
					  <div class="control-group">
					    <label class="control-label" for="inputFName">First Name*</label>
					    <div class="controls">
					      <input type="text" name="FName" id="inputFName" maxlength="50"  value='<?php echo $fgmembersite->SafeDisplay('FName') ?>' required="" placeholder="Type your First Name here">
					    </div>
					  </div>
					  <div class="control-group">
					    <label class="control-label" for="inputLName">Last Name*</label>
					    <div class="controls">
					      <input type="text" name="LName" id="inputLName" value='<?php echo $fgmembersite->SafeDisplay('LName') ?>' required="" placeholder="Type your Last Name here" maxlength="50">
					    </div>
					  </div>
					  
					  <div class="control-group">
					    <label class="control-label" for="emailAdd">Email Address*</label>
					    <div class="controls">
					      <input type="email" id="emailAdd" name="emailAd" value='<?php echo $fgmembersite->SafeDisplay('emailAdd') ?>' required="" placeholder="Type your Email Address here" maxlength="50">
					    </div>
					  </div>
					  
					  <div class="control-group">
					    <label class="control-label" for="inputAddress">Address</label>
					    <div class="controls">
					      <input type="text" name="address" id="inputAddress" value='<?php echo $fgmembersite->SafeDisplay('address') ?>' required="" placeholder="Address here" maxlength="50" title="for US residents only">
					    </div>
					  </div>					  
					  
					  <div class="control-group">
					    <label class="control-label" for="inputCity">City</label>
					    <div class="controls">
					      <input type="text" name="city" id="inputCity" value='<?php echo $fgmembersite->SafeDisplay('city') ?>' required="" placeholder="City here" maxlength="50" title="for US residents only">
					    </div>
					  </div>
					  
					  
					  <div class="control-group">
					    <label class="control-label" for="inputZip">Zip</label>
					    <div class="controls">
					      <input type="text" name="zipcode" id="inputZip" value='<?php echo $fgmembersite->SafeDisplay('zipcode') ?>' required="" placeholder="Zipcode here" maxlength="50" title="for US residents only">
					    </div>
					  </div>
					  
					  
					  <div class="control-group">
					    <label class="control-label" for="age">Age*</label>
					    <div class="controls">
					      <input type="number" id="age" name="age" value='<?php echo $fgmembersite->SafeDisplay('age') ?>' required="" maxlength="2" min="18" max="80" title="must be over 18 to participate"/>
					    </div>
					  </div>
					  
					  
					  <div class="control-group">
					    <label class="control-label" for="age">Gender</label>
						<div class="controls">
						<label class="radio">
						  <input type="radio" name="gender" id="optionsRadios1" value="male" checked>
						  male
						</label>
						<label class="radio">
						  <input type="radio" name="gender" id="optionsRadios2" value="female">
						  female
						</label>
						</div>
					  </div>
					  
					  
					  
					  
					  
					  
					  <div class="control-group">
					    <label class="control-label" for="inputTel">Email News letter</label>
					    <div class="controls">
					      <input type="checkbox" name="newsletter" checked>
					    </div>
					  </div>
					   
					  
					   
					   
					   <div class="control-group">
					    <label class="control-label" for="uploadimage">Upload Image</label>
					    <div class="controls">
						<input type="file" id="uplimage" name="uplimage" accept="image/*" value="<?php echo $path; ?>'"/>
					      
					    </div>
					  </div>
					 
					  
					  
					  
					  
					   
					  
					  <div class="control-group">
					    <div class="controls">
					       
					      <button type="button" class="btn" id="sbmt_btn">Submit</button>
					    </div>
					  </div>
					  
					 <div class="modal hide alert-success" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					  <div class="modal-header">
					    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					    <h3 id="myModalLabel">Terms and Condition</h3>
					  </div>
					  <div class="modal-body">
					     
					    <p>"I have read the contest rules"</p>
					     
						<p><input type="checkbox" name="read_rules" id="read_rules" checked="false">  Yes</p>
					    
 
					    
					  </div>
					  <div class="modal-footer">
					  <div class="control-group">
					    <div class="controls">
					    <button type="submit" id="close" class="btn">OK</button>
					    </div>
					    </div>
 					  </div>
					</div>
						<div class="alert alert-error hide">
							<p>Oh shit! Error below:</p>
							<div id="error-output" class="prettyprint"></div>
					</div>
					</form>
		</div> <!-- end form_ -->

hi question regarding FORMS

hindi ba't importante ang attribe na enctype="multipart/form-data" pag nag upload ng file e.g images ?..

ganito yung problem ko..

* pag inilagay ko yung attribute na yan sa form, hindi ko nafefetch yung data (arrays) ng input type="file" via $_POST
bale pag nag print_r($_POST) ako, kulang na yung arrays specifically yung input type="file"

*pag hindi ko naman inilagay yung attribute.. kompleto na yung array of data ko, kasama na yung value ng input type="file" pero ang problema naman is yung file, hindi sya nacocopy sa server.. parang upload fail pero yung data nya, nafefetch ko naman via $_POST, e.g filename
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga sir gusto ko p0ng matuto nga java script with css at yung jquery na tinatawag..2years comsci po ako trimester working student po ako pang gabi..sana po matulungan nyo ko thanks
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga sir gusto ko p0ng matuto ng java script with css at yung jquery na tinatawag..2years comsci po ako trimester working student po ako pang gabi..sana po matulungan nyo ko thanks
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Cguro both na lang. Session sa server sya pag close mo ng browser mawawala yung session, Cookies sa client sya ang tagal existence nya base sya binigay mo pag close mo ng browser nandyan parin yung cookies.

ahh.. cge po magCOOKIES na lang siguro ako..

thanks po
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga programmer paano mag create ng log-in form na may log-in time and date ? pakisagot po sa tanong


salamat
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

kuya my cno my alam na function carbon copy sa email
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

suggest nmn kayo na mg application for creating website..
gamit ko ngayon dreamweaver .. pero ang papangit ng mga design dun..
wala bang applicatio na meron ng mga nakalagay n design.. tapos konting edit edit nlng
 
Back
Top Bottom