mona
Members-
Posts
45 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by mona
-
I'm searching for ideas about an xml webpage, and how can I do it? (by what languages). only a certain idea about a webpage that can be done simply by xml to be as final project of my courseAlso I want o know if I can make xml, xsl or xslt with databases or notif yes, how?
-
hi every one, I'm new in xml. Actually I'm taking an xml course and I should make a writing and a programming project about xml.I need your help to choose my writing title and a project suggestions, in a way that they'll be related to each other.for example, if I choose my writing as "xml and database", I make the project in xml with mysql.Actually I know how to write xml files, and I know database carefully and also php and I can learn java if it is needed but the problem is that I don't know what kind of project can I do and what languages I should use, and wht is simpler to me as new in xml.please can any one give me a suggestion and help me choosing my project ?
-
thank u actually may be u r right I'll try it coz javascript functions are case sensitive as I think.
-
I tried what u said nothing happened, as I told before may be the problem in the arrays , can u check up if there is an error in declairing those arrays
-
hi can u help me to pass php values to javascript array,actually I have many drop down boxesI need onchange of one of them to change the values of the others according to the value of the first oneand since I dont need to submit the form to take the values and use them in php , I tried at the first of my program to put all the data in javascript arrays and then onchange I use javascript function to search for my values. this is a logical solution but it is not working with me, can u find the problemthis is my program:search.php<?php$db = mysql_connect('localhost','root', 'memo1982');mysql_select_db ("collab1",$db);$sql=mysql_query("select * from student",$db);?><script language='javascript'>function lolo(){p=0;var id=new array();var fname=new array();var lname=new array();var gender=new array();var level=new array();var type=new array();<?$sql1=mysql_query("select * from sanction s, student st, officer o where s.Id=st.Id and s.Oid=o.Oid",$db);while($row = mysql_fetch_array($sql1, MYSQL_NUM)){?>id[p]=<?=$row["Id"]?>;p=p+1;<?}?>document.write(p); //i made this one only to see if the function is working but it is not working}</script>it is not even understand the arrays, can u help me work with arrays and solve my problem?
-
hi can u help me to pass php values to javascript array,actually I have many drop down boxesI need onchange of one of them to change the values of the others according to the value of the first oneand since I dont need to submit the form to take the values and use them in php , I tried at the first of my program to put all the data in javascript arrays and then onchange I use javascript function to search for my values. this is a logical solution but it is not working with me, can u find the problemthis is my program:search.php<?php$db = mysql_connect('localhost','root', 'memo1982');mysql_select_db ("collab1",$db);$sql=mysql_query("select * from student",$db);?><script language='javascript'>function lolo(){p=0;var id=new array();var fname=new array();var lname=new array();var gender=new array();var level=new array();var type=new array();<?$sql1=mysql_query("select * from sanction s, student st, officer o where s.Id=st.Id and s.Oid=o.Oid",$db);while($row = mysql_fetch_array($sql1, MYSQL_NUM)){?>id[p]=<?=$row["Id"]?>;p=p+1;<?}?>document.write(p); //i made this one only to see if the function is working but it is not working}</script><html><head><title>Disciplinary Sanctions Search</title><img src='ltu.bmp' width="974" height="72"/><Style TYPE="text/css">.boldtable, .boldtable TD, .boldtable TH{font-size:12pt;color:#000066;}</style></head><body background='bg.jpg'><h1><font color="#000080">Search<hr></font></h1><form name='search' method='post' action='search2.php'><table class='boldtable'><tr><td bgcolor='99cccc'>Student ID:</td><td><select name='sid' class='boldtable' onchange="lolo()"><option value='All'>All<?while ($row = mysql_fetch_array($sql, MYSQL_NUM)) {?><option value='<?= $row[0]?>'><?= $row[0]?><? }?></select></td></tr><tr><td bgcolor='99cccc'>First Name:</td><td><select name='fn' class='boldtable'><option value='All'>All<?$sql=mysql_query("select * from student",$db);while ($row = mysql_fetch_array($sql, MYSQL_NUM)) {?><option value='<?= $row[1]?>'><?= $row[1]?><? }?></select></td></tr><tr><td bgcolor='99cccc'>Last Name:</td><td><select name='ln' class='boldtable'><option value='All'>All<?$sql=mysql_query("select * from student",$db);while ($row = mysql_fetch_array($sql,MYSQL_NUM)) {?><option value='<?= $row[2]?>'><?= $row[2]?><? }?></select></td></tr><tr><td bgcolor='99cccc'>Gender:</td><td><select name='######' size='3' class='boldtable'><option value='All' selected>All<option value='M'>Male<option value='F'>Female</select></td></tr><tr><td bgcolor='99cccc'>Level:</td><td><select name='level' size='6' class='boldtable'><option value='All' selected>All<option value='G'>G-Grad<option value='Sr'>Sr-Senior<option value='J'>J-Junior<option value='S'>S-Soph<option value='F'>F-Fresh</select></td></tr><tr><td bgcolor='99cccc'>Date From:</td><td>Month:<select name='monthf' class='boldtable'><option value='0'><?for ($i=1;$i<=12;$i++) {?><option value='<?= $i?>'><?= $i?><? }?></select>Day:<select name='dayf' class='boldtable'><option value='0'><?for ($i=1;$i<=31;$i++) {?><option value='<?= $i?>'><?= $i?><? }?></select>Year:<select name='yearf' class='boldtable'><option value='0'><?for ($i=1990;$i<=2010;$i++) {?><option value='<?= $i?>'><?= $i?><? }?></select></td></tr><tr><td bgcolor='99cccc'>Date To:</td><td>Month:<select name='monthto' class='boldtable'><option value='0'><?for ($i=1;$i<=12;$i++) {?><option value='<?= $i?>'><?= $i?><? }?></select>Day:<select name='dayto' class='boldtable'><option value='0'><?for ($i=1;$i<=31;$i++) {?><option value='<?= $i?>'><?= $i?><? }?></select>Year:<select name='yearto' class='boldtable'><option value='0'><?for ($i=1990;$i<=2010;$i++) {?><option value='<?= $i?>'><?= $i?><? }?></select></td></tr><tr><td bgcolor='99cccc'>Student Conduct Officer:</td><td><select name='officer' class='boldtable'><option value='All'>All<?$sql1=mysql_query("select * from officer",$db);while ($row = mysql_fetch_array($sql1, MYSQL_NUM)) {?><option value='<?= $row[0]?>'><?= $row[1]." ".$row[2]?><? }?><tr><td bgcolor='99cccc'>Violation Type:</td><td><select name='type' class='boldtable'><option value='All' selected>All<option value='DW'>DW-Warning<option value='DP'>DP-Probation<option value='LP'>LP-Loss Privileges<option value='LAC'>LAC-Loss Acad Credit<option value='F'>F-Fines<option value='RES'>RES-Restitution<option value='DS'>DS-Sanction<option value='US'>US-Univ. Suspend<option value='UE'>UE-Univ. Expel<option value='IS'>IS-Interim Suspend<option value='ISH'>ISH-Interim Suspend Housing<option value='TR'>TR-Temp Reassign<option value='TRP'>TRP-Temp Restrict-Personic Contact<option value='WDP'>WDP-Withdraw Prior to Disposition</select></td></tr><tr><td bgcolor='99cccc'>Section:</td><td><input type='text' name='section'/></td></tr></table><br><input type='hidden' name='page' value='search1'/><input type="submit" value="Search"/><input type="reset" value="Reset"/></body></html>
-
Iam working with my project and i had no timeIam working with a php, mysql program, In this program I have combobox for student_id I need onchange of this combo to execute another select statement (for example select name from student where studentid=...) and put the name in a text boxmy problem is as follows:onchange I need to call a javascript function and inside it run a php that selects from table where studentid=(the value of the combo). how can I do that, that is passing javascript variables or values to php I tried to make submit to the same form but it is not working this is my php file:add1.php <?php$db = mysql_connect('localhost','root', 'password');mysql_select_db ("collab1",$db);$sql=mysql_query("select Id from student",$db);?><html><title>New Violation</title><body><form name='form1' method='post' action='add1.php'>Student Id:<select name='sid' onchange='getname()'><?while ($row = mysql_fetch_array($sql, MYSQL_NUM)) {?><option value='<?= $row[0]?>'><?= $row[0]?><? }?></select><br>Name:<input name='sname' type='text'/><input type='submit' value='Add New Violation'/></form><script language='javascript'>function getname(){{ form1.submit(); <?if(isset($_POST["sid"])){$sql=mysql_query("select * fom student where student_id=".$_POST["sid"],$db);$row=mysql_fetch_row($sql);}?>form1.sname.value=<?=$row["sname"]?>;}</script></html> [edit] wrapped code in tags - skemcin[/i]
-
Iam new here and need your help please!Iam working with a php, mysql program, In this program I have let's say 3 combo box (select tags)one for student_id , one for first name and the other for last name,I already got data from mysql using( select * from student) and put them in these combos, but I need onchange of each one to execute another select statement (for example if we change first name select * from student where firstname=....), so I need to clear the other combos and refill them again according to the new query. so, I'll obtain all the students whose first name=...here we need to call a function that makes combo clear using javascript (form1.fn.options.length=0) and also execute a new query(select * from student where fn=..) and refill combos again(new option(....))my questions are:1. do I need to call php function or javascript function onchange of select tag and if php how can i do that?2.how can we take form variables (value of select) and put them in sql statement?if any have idea about this please help me because I am lost and I dont know what to do.
-
hi I did something like that but know i'm facing a problem.under if(isset($delete)){//delete stuff}if I want to delete this stuff I should take the value of record01 and record02how can I do this in php and put them in variables such as $r1,$r2 to delete or update, knowing that I need to stay on the same page.
-
yes I'm already working with phpwith apache2 and mysql all of them are working carefully, so how to do what I need using these languages.
-
I have a table called officer that contains the names of officers. I want to make a page that lists these officers and when I click on a certain officer I can delete or update this officer, also there is a button called add so when i click add and insert a certain officer I want the name to be added directly to the old list. how can I make this in html please let me know the tools and if any one can gave me a simple example he will be more than welcome. knowing that I know how to do the sql statements i only wants to know the html tools like list box or something like that.
-
I'm doing a project using html, php and mysql. I want to make something like a form in vb but i want to use html. i used form tag but inside this form i need to show a list of records , I can use a table to show them but the problem is that I need the user to click on a certain record and be able to change it , or delete it, also i need when I add another record it is added below in the list. In vb we can use a datagrid Is there anything in html similar to this, or if u have any other ideas for how to do theseplease help me. knowing that the only problem is that the tool, whereas the queries and everything is simple to me.
-
Iam using php and html I don't want to use javascriptcan u give me a function in php that set a focus to a certain input text.I know how to write it in java script, I need it in php, please give example.
-
I want to connect from php to mysql, I saw an example in the tutorials for access database using ODBC I tried it for mysql they asked me about host name and user name and passwordi don't know what hostname should i put knowing that when i run mysql i only enter a password and it works so I don't have username in mysqlwhat should i do and can i make it without odbc
-
i want a function that adds a backspace in php coz I have for loop in php and I want to leave a space at the begining if i<10 but i tried the following it doesn't workif ($i<10) echo " ";echo "<font color='red'>". $i ."</font>