Xeon-YK
-
Posts
10 -
Joined
-
Last visited
Never
Posts posted by Xeon-YK
-
-
i have a problem with split.
i want to ask how if i want split the string with enter character
example :
i have string :
rudy 10 male
eric 12 male
john 13 male
when i split with enter character i will become three part
1. rudy 10 male
2. eric 12 male
3. john 13 male
i have try with this $temp_str = split('\n', $str);
but i didn't work, the result is split with n character.
how to solve this problem, thank... -
how to show browse file window..., can u tell me the url
-
How to make Pagging in PHP...
i want to show my data example 100 data, and i want show my data in 3 page, each page content 30 data...
how can i show it with pagging system
can u give me the url or tutorial for this pagging -
i have 2 php file, tes and tes2.
tes :
<form name="form1" method="post" action="tes2.php">
<?
if( !isset($msg))
{
echo "tes";
}
else
echo "tes1";
?>
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit">
</form>
<?
?>
tes2 :
<?
header( "location: tes.php?msg=1" ) ;
?>
when i click on submit button, it will go to tes2.php and tes2.php will redirect back to tes.php and set msg=1
but when i try in my computer $msg always zero. why???
i try this in two computer, first computer work and second computer didn't work.
may be i must setting php.ini file, but i don't know to set it???
how can i solve this problem... thank.... -
i want to get the select value because from the selected value i want to use the value in mysql_query and view the result before i submit the form
example :
$edu = $_POST["education"];
select * from master_education where level=$edu
can't you help me to solve this problem or you can tell me another solution, thank you... -
hi..., i wan't to ask how to remote to mysql
i have make a php application and i want to use mysql for the database in different computer, the computer ip is 10.20.37.77 and mysql port 3306, the password = "root"
here is the code
$MySQL_Username = "root";
$MySQL_Host = "10.20.37.77";
$MySQL_Passwd = "root" ;
$MySQL_DB = "squid";
$db = mysql_connect( $MySQL_Host , $MySQL_Username , $MySQL_Passwd ) ;
the error :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'xeon' (using password: NO) in D:\Program
if the php application use mysql in localhost it work
$MySQL_Username = "root";
$MySQL_Host = "localhost";
$MySQL_Passwd = "" ;
$MySQL_DB = "squid";
$db = mysql_connect( $MySQL_Host , $MySQL_Username , $MySQL_Passwd ) ;
please help me, thank you
-
thank for reply my question...
but i want ask one question again, how i get the select value before submit and i want store to php variabel???
thank you -
Hi, I'm Beggining in PHP.
I Want to ask how to get select value before i submit
here is the code i want get and print out the <select name = "education"> value (in line 3) before i click the submit button so when the page load it will print out selected value in this case Jr.High
Please help me.... thank you
01<?php
02$education = $_POST["education"];
03echo $education;
0i4f (!isset($_POST['submit']))
05{
06?>
07
08
09<form method="post" action="<?php echo $PHP_SELF;?>">
10 <select name="education">
11 <option value="Jr.High">Jr.High</option>
12 <option value="HighSchool">HighSchool</option>
13 <option value="College">College</option>
14 </select>:<br />
15 <input type="submit" value="submit" name="submit"><br />
16</form><br />
17
18<?
19
20}
21else {
22
23echo $education;
24}
25?>
mysql_fetch_array problem
in PHP Coding Help
Posted
this my query string
$sql = "select * from a, b where a.id = b.id"
$rs = mysql_query($sql);
echo mysql_error();
when i try :
$i = 0;
while($row = mysql_fetch_array($))
{
echo $row[$i];
$i++;
}
but it only print one row, and i try to use
$num = mysql_num_rows, it return 936 row
why the summary is different between i use mysql_fetch_array and mysql_num_rows
thank...