Community Member
Member Avatar
aseel_1 Replied To a Post in php
Topic by aseel_1 in Web Development
im not expert in english ^_^ thanks for your advice "iamthwee" Reply by aseel_1
Member Avatar
aseel_1 Marked Solved Status for php
Hi all ;
please help me what is the expected problem in this code ??!

function SearchGrid($query,$updateOk=FALSE,$DeleteOk=FALSE)
{

$tbl.="<script>
var prev=1;
function HighLightRow(rowno){
if (rowno%2==0)
tblsearch.rows[prev].bgcolor='#66FF99';
else
tblsearch.rows[prev].bgcolor='#CCCC99';

tblsearch.rows[rowno].bgcolor='white';
prev=rowno;
}
</script> ";


$result=mysql_query($query);
$tbl.="<table id=tblsearch align =center border=0 >
<tr bgcolor=gray>";

$RowNum =mysql_num_fields($result);
//name of field :) ....
for($col=0;$col<$RowNum;$col++) … Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Replied To a Post in php
Topic by aseel_1 in Web Development
thanks all :) solved ^_^ Reply by aseel_1
Member Avatar
aseel_1 Replied To a Post in php
Topic by aseel_1 in Web Development
like ? Reply by aseel_1
Member Avatar
aseel_1 Created php
Hi all ;
please help me what is the expected problem in this code ??!

function SearchGrid($query,$updateOk=FALSE,$DeleteOk=FALSE)
{

$tbl.="<script>
var prev=1;
function HighLightRow(rowno){
if (rowno%2==0)
tblsearch.rows[prev].bgcolor='#66FF99';
else
tblsearch.rows[prev].bgcolor='#CCCC99';

tblsearch.rows[rowno].bgcolor='white';
prev=rowno;
}
</script> ";


$result=mysql_query($query);
$tbl.="<table id=tblsearch align =center border=0 >
<tr bgcolor=gray>";

$RowNum =mysql_num_fields($result);
//name of field :) ....
for($col=0;$col<$RowNum;$col++) … Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Began Watching php
Hi all ;
please help me what is the expected problem in this code ??!

function SearchGrid($query,$updateOk=FALSE,$DeleteOk=FALSE)
{

$tbl.="<script>
var prev=1;
function HighLightRow(rowno){
if (rowno%2==0)
tblsearch.rows[prev].bgcolor='#66FF99';
else
tblsearch.rows[prev].bgcolor='#CCCC99';

tblsearch.rows[rowno].bgcolor='white';
prev=rowno;
}
</script> ";


$result=mysql_query($query);
$tbl.="<table id=tblsearch align =center border=0 >
<tr bgcolor=gray>";

$RowNum =mysql_num_fields($result);
//name of field :) ....
for($col=0;$col<$RowNum;$col++) … Topic by aseel_1 in Web Development
Member Avatar
s their an error in this code ?? !!
it display Image uploded successfully but it isn't !!!!!!!



if(isset($_POST['submit']))
{
$query="insert into POST
(Title,SubTitle,PostDetail,PDay,PMonth,PYear)
values('$_POST[_title]','$_POST[_subtitle]','$_POST[_detail]',".
date("d").",".date("m").",".date("y").")";
//echo $query;
mysql_query($query);
$msg="post added sucsessfully";
if($_FILES['_postimage']['tmp_name']!= "")
{
move_uploaded_file($_FILES['_postimage']['tmp_name']
,$_SERVER['DOCUMENT_ROOT'].'/Aseelblog/POST_imgs/a.jpg');
$msg.="</br>Image uploded successfully";
//DOCUMENT_ROOT=/var/www/example /////
}
else
{
$msg.="image File too large or … Topic by aseel_1 in Web Development
php
Member Avatar
aseel_1 Began Watching php uplode image
s their an error in this code ?? !!
it display Image uploded successfully but it isn't !!!!!!!



if(isset($_POST['submit']))
{
$query="insert into POST
(Title,SubTitle,PostDetail,PDay,PMonth,PYear)
values('$_POST[_title]','$_POST[_subtitle]','$_POST[_detail]',".
date("d").",".date("m").",".date("y").")";
//echo $query;
mysql_query($query);
$msg="post added sucsessfully";
if($_FILES['_postimage']['tmp_name']!= "")
{
move_uploaded_file($_FILES['_postimage']['tmp_name']
,$_SERVER['DOCUMENT_ROOT'].'/Aseelblog/POST_imgs/a.jpg');
$msg.="</br>Image uploded successfully";
//DOCUMENT_ROOT=/var/www/example /////
}
else
{
$msg.="image File too large or … Topic by aseel_1 in Web Development
php
Member Avatar
Suppose I have a tow SQL tables:
Fathers

id | name
-------------
1 | Clinton
2 | Gates
3 | Bush
4 | Clinton

Sons

id | fatherid | name
---------------------
1 | 1 | bill
2 | 1 | suzy
3 | 2 | mera
4 | 2 | … Topic by aseel_1 in Web Development
Member Avatar
Suppose I have a tow SQL tables:
Fathers

id | name
-------------
1 | Clinton
2 | Gates
3 | Bush
4 | Clinton

Sons

id | fatherid | name
---------------------
1 | 1 | bill
2 | 1 | suzy
3 | 2 | mera
4 | 2 | … Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Began Watching JOIN SQL Having , MYSQL
Suppose I have a tow SQL tables:
Fathers

id | name
-------------
1 | Clinton
2 | Gates
3 | Bush
4 | Clinton

Sons

id | fatherid | name
---------------------
1 | 1 | bill
2 | 1 | suzy
3 | 2 | mera
4 | 2 | … Topic by aseel_1 in Web Development
Member Avatar
Salam all :)

anyone can help me to understand this query in venn diagram



SELECT e.id,
e.name
FROM emp e
INNER JOIN deptid D_X
ON e.empid = d_x.empid
AND deptid = 'X'
LEFT JOIN deptid D_Y
ON e.empid = d_Y.empid
AND deptid = 'Y'
WHERE d_Y.empid IS NULL Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Began Watching venn diagram Join SQL
Salam all :)

anyone can help me to understand this query in venn diagram



SELECT e.id,
e.name
FROM emp e
INNER JOIN deptid D_X
ON e.empid = d_x.empid
AND deptid = 'X'
LEFT JOIN deptid D_Y
ON e.empid = d_Y.empid
AND deptid = 'Y'
WHERE d_Y.empid IS NULL Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Replied To a Post in JOIN SQL
Topic by aseel_1 in Web Development
and if i want to display all dep(son) with emp(father)
every son with father name
nameOfDep empname
? Reply by aseel_1
Member Avatar
aseel_1 Marked Solved Status for JOIN SQL
Hi all ,

i have 2 tables

first one called emp have 2 columns id and name

second one called dep have id and empid and nameOfDep

if i want to list all emp that have X dep (But they don't have) Y dep


how i can make it ? … Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Replied To a Post in JOIN SQL
Topic by aseel_1 in Web Development
Thanks all for your time ^_^
useful comments Reply by aseel_1
Member Avatar
Hi all

why this code doesn't work correctly but php validate without js work correctly and js without php validate work correctly ?!

form.php




<html>
<head>
<title>Registration Form</title>
<script language="JavaScript" type="text/javascript">
Function validate ()
{
var str=true;
document.getElementById("name").innerHTML="";
document.getElementById("username").innerHTML="";
document.getElementById("pass1").innerHTML="";
document.getElementById("pass2").innerHTML="";
document.getElementById("email1").innerHTML="";
document.getElementById("web").innerHTML="";
if(document.frm.nameTxt.value=='')
{
document.getElementById("name").innerHTML="Please Enter your name";
str=false; … Topic by aseel_1 in Web Development
Member Avatar
Topic by aseel_1 in Web Development
SOLVED ^_^ Reply by aseel_1
Member Avatar
Topic by aseel_1 in Web Development
Thanks all for useful comments ^_^ Reply by aseel_1
Member Avatar
aseel_1 Created JOIN SQL
Hi all ,

i have 2 tables

first one called emp have 2 columns id and name

second one called dep have id and empid and nameOfDep

if i want to list all emp that have X dep (But they don't have) Y dep


how i can make it ? … Topic by aseel_1 in Web Development
Member Avatar
aseel_1 Began Watching JOIN SQL
Hi all ,

i have 2 tables

first one called emp have 2 columns id and name

second one called dep have id and empid and nameOfDep

if i want to list all emp that have X dep (But they don't have) Y dep


how i can make it ? … Topic by aseel_1 in Web Development
Member Avatar
Topic by aseel_1 in Web Development
it is go to insertData.php without run js code :( Reply by aseel_1
Member Avatar
Hi all

why this code doesn't work correctly but php validate without js work correctly and js without php validate work correctly ?!

form.php




<html>
<head>
<title>Registration Form</title>
<script language="JavaScript" type="text/javascript">
Function validate ()
{
var str=true;
document.getElementById("name").innerHTML="";
document.getElementById("username").innerHTML="";
document.getElementById("pass1").innerHTML="";
document.getElementById("pass2").innerHTML="";
document.getElementById("email1").innerHTML="";
document.getElementById("web").innerHTML="";
if(document.frm.nameTxt.value=='')
{
document.getElementById("name").innerHTML="Please Enter your name";
str=false; … Topic by aseel_1 in Web Development
Member Avatar
Hi all

why this code doesn't work correctly but php validate without js work correctly and js without php validate work correctly ?!

form.php




<html>
<head>
<title>Registration Form</title>
<script language="JavaScript" type="text/javascript">
Function validate ()
{
var str=true;
document.getElementById("name").innerHTML="";
document.getElementById("username").innerHTML="";
document.getElementById("pass1").innerHTML="";
document.getElementById("pass2").innerHTML="";
document.getElementById("email1").innerHTML="";
document.getElementById("web").innerHTML="";
if(document.frm.nameTxt.value=='')
{
document.getElementById("name").innerHTML="Please Enter your name";
str=false; … Topic by aseel_1 in Web Development
Member Avatar
Hi all ,

I am a new in PHP my code don't save information in db and password confirmation code doesn't work correctly

this is my simple code :


<?php
// decleration for varible
$name=$_POST['nameTxt'];
$username=$_POST['userNameTxt'];
$passTxt=$_POST['passTxt'];
$passConTxt=$_POST['passConTxt'] ;
$email=$_POST['email'];
$website=$_POST['website'];
$errors=0;
$submit=$_POST['btn_done'];
// connection to mysql
$con=mysqli_connect('localhost','root','root');
if(!$con){
die('Could … Topic by aseel_1 in Web Development
Member Avatar
Topic by aseel_1 in Web Development
Thanks all for your time :) Reply by aseel_1
Member Avatar
Topic by aseel_1 in Web Development
no problems in DB ,,, i found it
i changed this st.
if(0 !==strcmp($_POST['passTxt'], $_POST['passConTxt']))
with this:
elseif($_POST['passTxt']!=$_POST['passConTxt'] )

and this
if(0===$errors)
with
if(0==$errors)

it's work now ^_^ Reply by aseel_1
Member Avatar
Topic by aseel_1 in Web Development
Thank you i fixed it but still not adding to db :( ! Reply by aseel_1
Member Avatar
Hi all ,

I am a new in PHP my code don't save information in db and password confirmation code doesn't work correctly

this is my simple code :


<?php
// decleration for varible
$name=$_POST['nameTxt'];
$username=$_POST['userNameTxt'];
$passTxt=$_POST['passTxt'];
$passConTxt=$_POST['passConTxt'] ;
$email=$_POST['email'];
$website=$_POST['website'];
$errors=0;
$submit=$_POST['btn_done'];
// connection to mysql
$con=mysqli_connect('localhost','root','root');
if(!$con){
die('Could … Topic by aseel_1 in Web Development
Member Avatar
Hi all ,

I am a new in PHP my code don't save information in db and password confirmation code doesn't work correctly

this is my simple code :


<?php
// decleration for varible
$name=$_POST['nameTxt'];
$username=$_POST['userNameTxt'];
$passTxt=$_POST['passTxt'];
$passConTxt=$_POST['passConTxt'] ;
$email=$_POST['email'];
$website=$_POST['website'];
$errors=0;
$submit=$_POST['btn_done'];
// connection to mysql
$con=mysqli_connect('localhost','root','root');
if(!$con){
die('Could … Topic by aseel_1 in Web Development