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

Mga master, anong php codes ang pwedeng gamitin pra ma-view ng user ang ininput na data ng admin.

kc ang function ng user ay mg-view ng data then ang admin ang mag-input ng data.

then appserv ang gamit nmen sa php.

PATULONG AMAN PO PLEASE.......................... :help: :praise:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga idol, pano ung query para makagawa ng pagination sa mySQL?

example << FIRST < 1 2 3 > LAST >>

patulong naman TIA :)
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga master, sino may alam gumamit ng wordpress at codeigniter? need your help :thanks:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

TS? need ko po ng HTML code ng COMMENT BOX,.. kahit ano po as long as GUMAGANA..tnx in advance na po sa magrereply po..
Kailagan ko na kasi BUKAS,.,:weep:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga idol pa check naman po ng codes ko anu po ba mali?


dapat po kasi i didisplay nya lahat ng userid ng mga emails na ilalagay sa textbox kaso ang ng yayari yung last na email lang ang dinidisplay yung id

thanks po

up po pa help

teka :)
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga idol pa check naman po ng codes ko anu po ba mali?


dapat po kasi i didisplay nya lahat ng userid ng mga emails na ilalagay sa textbox kaso ang ng yayari yung last na email lang ang dinidisplay yung id

thanks po

up po pa help

Wala ka namang code na mag.display kay $uid eh. Kulang din yong {} mo. Yong dinisplay mo is ang $line, di ang uid. Here's my code below try to see.

Code:
//explode all separate lines into an array
$textAr = explode("\n", $text);

//trim all lines contained in the array.
$textAr = array_filter($textAr, "trim");

//loop through the lines
foreach ($textAr as $line)
{
    $uid = mysql_query("SELECT * FROM dr_users where mail LIKE '" . $line . "'") or die(mysql_error());

    echo "Line " . $line . "<hr>";

    while ($row = mysql_fetch_assoc($uid))
    {
        echo $row["uid"] . "<br>";
    }
}
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga idol, pano ung query para makagawa ng pagination sa mySQL?

example << FIRST < 1 2 3 > LAST >>

patulong naman TIA :)


Try learning LIMIT and OFFSET

SELECT f_name, l_name FROM student ORDER BY l_name, f_name LIMIT 10 OFFSET 1


Ang gagawin mo lang jan is to update the OFFSET value.

Like sa pagination mo is [Previous][1][2][3][Next] if na click si 3, yong value ang e.palit mos a offset is 3

magiging

SELECT f_name, l_name FROM student ORDER BY l_name, f_name LIMIT 10 OFFSET 3

What happen in there mag.display cya ng 10 starting from 21-30. Try mo more or less.
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

TS? need ko po ng HTML code ng COMMENT BOX,.. kahit ano po as long as GUMAGANA..tnx in advance na po sa magrereply po..
Kailagan ko na kasi BUKAS,.,

<textarea width="250" height="250"></textarea>

yung width yung lapad yung height yung haba .. sana nakatulong
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

pahelp po, sino gumagamit ng pyrocms? :thanks:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

ito hinahanap ko ayos to dami mga magaling sa php Mysql pa join ako dito
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga master patulong naman poh about sa phpbb may forum poh kc sa gagawin nming site! gusto q sana gamitin ung phpbb kaso wala tlga aq idea kung panu gamitin bale login/registration pa lang poh ung nagawa sa site and next na poh ung forum.. nu poh ba kelangan q gawin? ppatutorial naman poh mga master ntin jan! nid lang poh tlaga asap! pls pls pls pls pls:pray::pray::upset:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga master pa help po sa code ayaw kasi dumirekta sa index.php ung ginawa ko..

index.php

<?php

session_start();
if(!isset($_SESSION["manager"])){
header("location:admin_login.php");
exit();
}

//be sure to check this manager SESSION value is in fact in the database
$managerID = preg_replace('#[^0-9]#i','',$_SESSION["id"]); //filter everything but numbers and letters
$manager = preg_replace('#[^A-Za-z0-9]#i','',$_SESSION["manager"]); //filter everything but numbers and letters
$password = preg_replace('#[^A-Za-z0-9]#i','',$_SESSION["password"]); //filter everything but numbers and letters
//Run mySQL query to be sure that this person is an admin and their password session var equals the database information
//connect to mySQL database
include "../storescripts/connect_to_mysql.php";
$sql = mysql_query("SELECT*FROM admin WHERE id='$managerID'AND username='$manager' AND password='$password' LIMIT 1"); //query the person
//.......MAKE SURE PERSON EXISTS IN THE DATABASE............
$existCount = mysql_num_rows($sql); //count the rows nums
if($existCount ==0){//evaluate the count
echo "Your login session data is not on record in the database.";
exit();
}


?>


admin_login.php

<?php

session_start();
if(isset($_SESSION["manager"])){
header("location:index.php");
exit();
}
?>
<?php
//parse the log in form if the user has filled it out and pressed"login"
if(isset($_POST["username"])&& isset($_POST["password"])){

$manager = preg_replace('#[^A-Za-z0-9]#i','',$_POST["username"]); //filter everything but numbers and letters
$password = preg_replace('#[^A-Za-z0-9]#i','',$_POST["password"]); //filter everything but numbers and letters
//connect to the mySQL database
include "../storescripts/connect_to_mysql.php";
$sql = mysql_query("SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"); //query the person
// .....MAKE SURE PERSON EXISTS IN DATABASE........
$existCount = mysql_num_rows($sql); //count the rows nums
if($existCount ==1){//evaluate the count
while($rows = mysql_fetch_array($sql)){
$id = $row["id"];
}
$_SESSION["id"]= $id;
$_SESSION["manager"]= $manager;
$_SESSION["password"]= $password;
header("location:index.php");
exit();
}else {
echo 'That information is incorrect, try again <a href="index.php">Click here</a>';
exit();
}
}
?>

alin po kaya mali jan po

e2 po nalabas pag nag login ako pero tama naman login ko

"Your login session data is not on record in the database"
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sir may tanung aq, pwd b iedit ang site na"magtxt.com/chatroom.php" yaw q kc magloin using facebook or twitter eh gus2 q guest lng....pwd kya un??help nmna..tnx..PM u nman po me kung pnu..tnx
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga masters, pahelp naman po ako dito sa codes ko.
Ayaw po maedit. so basically edit.php yung may error.
Padownload nalang po ng attachments sa baba. thank you.
 

Attachments

  • simple.zip
    4 KB · Views: 7
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga master patulong naman poh about sa phpbb may forum poh kc sa gagawin nming site! gusto q sana gamitin ung phpbb kaso wala tlga aq idea kung panu gamitin bale login/registration pa lang poh ung nagawa sa site and next na poh ung forum.. nu poh ba kelangan q gawin? ppatutorial naman poh mga master ntin jan! nid lang poh tlaga asap! pls pls pls pls pls:pray::pray::help:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Nyahhaah sinubukan ko tignan ung mga code.
Ang gugulo ng codes

@mateth02

ikaw po ba talaga gumawa nyan? Yang lumabas na message Ikaw gumawa nyan eh.
dito Nakalagay oh

if($existCount ==0){//evaluate the count
echo "Your login session data is not on record in the database.";
exit();
}

Ang gulo rin po ng structure nyo. Mali kasi ung positioning ng header nyo po. Saan po ba hindi nag reredirect ung pag press nyo ng submit?


@ceril_07
Ung binigay mong sql database di nag mamatch-up sa codes :upset:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga master pa help po sa code ayaw kasi dumirekta sa index.php ung ginawa ko..

index.php

<?php

session_start();
if(!isset($_SESSION["manager"])){
header("location:admin_login.php");
exit();
}

//be sure to check this manager SESSION value is in fact in the database
$managerID = preg_replace('#[^0-9]#i','',$_SESSION["id"]); //filter everything but numbers and letters
$manager = preg_replace('#[^A-Za-z0-9]#i','',$_SESSION["manager"]); //filter everything but numbers and letters
$password = preg_replace('#[^A-Za-z0-9]#i','',$_SESSION["password"]); //filter everything but numbers and letters
//Run mySQL query to be sure that this person is an admin and their password session var equals the database information
//connect to mySQL database
include "../storescripts/connect_to_mysql.php";
$sql = mysql_query("SELECT*FROM admin WHERE id='$managerID'AND username='$manager' AND password='$password' LIMIT 1"); //query the person
//.......MAKE SURE PERSON EXISTS IN THE DATABASE............
$existCount = mysql_num_rows($sql); //count the rows nums
if($existCount ==0){//evaluate the count
echo "Your login session data is not on record in the database.";
exit();
}


?>


admin_login.php

<?php

session_start();
if(isset($_SESSION["manager"])){
header("location:index.php");
exit();
}
?>
<?php
//parse the log in form if the user has filled it out and pressed"login"
if(isset($_POST["username"])&& isset($_POST["password"])){

$manager = preg_replace('#[^A-Za-z0-9]#i','',$_POST["username"]); //filter everything but numbers and letters
$password = preg_replace('#[^A-Za-z0-9]#i','',$_POST["password"]); //filter everything but numbers and letters
//connect to the mySQL database
include "../storescripts/connect_to_mysql.php";
$sql = mysql_query("SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"); //query the person
// .....MAKE SURE PERSON EXISTS IN DATABASE........
$existCount = mysql_num_rows($sql); //count the rows nums
if($existCount ==1){//evaluate the count
while($rows = mysql_fetch_array($sql)){
$id = $row["id"];
}
$_SESSION["id"]= $id;
$_SESSION["manager"]= $manager;
$_SESSION["password"]= $password;
header("location:index.php");
exit();
}else {
echo 'That information is incorrect, try again <a href="index.php">Click here</a>';
exit();
}
}
?>

alin po kaya mali jan po

e2 po nalabas pag nag login ako pero tama naman login ko

"Your login session data is not on record in the database"

sir try mo kaya echo ung session mo prang walang laman..

if($existCount ==1){//evaluate the count
$rows = mysql_fetch_array($sql);
$id = $rows["id"];

$_SESSION["id"]= $id;
$_SESSION["manager"]= $rows['username'];
$_SESSION["password"]= $password;
header("location:index.php");
exit();
}else {
echo 'That information is incorrect, try again <a href="index.php">Click here</a>';
exit();
}

try mo yan boss.. :thumbsup:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Pa help naman po gumawa ng

SQL QUERY na INSERT tapos EXECUTE sa loob ng LOOP

eto po ung code ,

Code:
 <?php
  			
			if(isset($_POST[save]))
			{
				//student,grade,section,subject
				$ids=$_POST['id'];
				$grades=$_POST['fg'];
				$secs=$_POST['secs'];
				$subs=$_POST['subs'];
				$yirs=$g_year['acad_id'];
	
			debug($_POST);
			if(isset($_POST['save']))
			{
			unset($_POST['save']);
			
			$i = count($_POST['id']); $x = 0;
			
				for($x=0; $x <$i;$x++){
				foreach($_POST as $data =>$d){
				echo $data.'-'.$d[$x].'<br/>';
		
[COLOR="Red"][B]//DITO PO PAPANO PO UNG QUERY KO DITO ?? :noidea:[/B][/COLOR]
		
[COLOR="Red"][COLOR="Lime"]// OR PAPANO PO ITO  -- > sql statement here (example): insert into table name (value ng $data) values( value ng $d[$x]) -- [/COLOR]
[/COLOR]	}}}}	

	
		
?>
<?php

function debug($arr){
	echo "<pre>";
	print_r($arr);
	echo "</pre>";
}
?>

at ito po ung Pag Na-SUBMIT ko na.. need ko po sana pahelp sa query








pa help naman po. thanks in advance!!:praise:
 
Last edited:
Back
Top Bottom