[PHP] string

2002-11-29 Thread Remon Redika
hi everyone..
how to get the part of string and make it into a variable..
sample :
  "determine"
now, i want to take just "mine" or 4 word from right, or "deter" (for left 
function).
and after i got it, i want to make the "mine" into $x variable
my mind..
$x = "mean" 

help please... 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] stupid question (Back Function)

2003-01-13 Thread Remon Redika
hi everyone, 

It's Possible We used Php Scripting to Back the client Browser
Like This Below :
(ussualy I make it with java script) : 

"javascript:history.back(1)" 

but right now, i need using the 'header's function', functionaly to back
the page to previouse page. 

sorry before :) 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] continue after break

2003-01-22 Thread Remon Redika
I have put Image inside of my loop... 
and that image located between  and  

I want the image not doing loop too. cause i just need one image..,
I just do looping for my data:
 and  


while ($row = mysql_fetch_array($myquery)){
?>


   




		
			

			
			
	  
   
 

   
 
   
 
   
   
	}
?> 


John W. Holmes writes: 

The solution is to take out your break... why is it there?? 

---John W. Holmes... 

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/ 

-Original Message-
From: Reymond [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 10:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] continue after break 

Hi everyone, 

I made a while loop and i'd like to know how to continue looping after
I

break it, and . Here is my script :
I found just break looping on my page, can't continue :( 


while ($row = mysql_fetch_array($myquery)){
?>

  

   

	   

	  		
cellspacing="0">
			

			
			
	  

 


  

  


	}
 ?> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Delete Related Table

2003-02-02 Thread Remon Redika
hi everyone.. 

i need delete two related table from mysql database,
but i am found and error..
this following my sql language : 

DELETE FROM X INNER JOIN Y ON X.ID = Y.ID WHERE Y.No = 144; 

i found an error in INNER JOIN syntax..
but i have successfully displaying 2 Related table in SELECT syntax..
my question..
any other way two delete two related table like above??..,
sorry if i ask out of topic..
need help... :)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Delete From Array

2003-02-03 Thread Remon Redika
Hi EveryOne..,
I need your help..
I am Using 2 Pages for Deleting rows.. 

In Page 1 Like This Below. (I am displaying The ID of table ..)
and my Page 1 Will Post to Page 2
in Page 2, I've Tried to Deleting Rows..
But I Can't Deleted the Rows... :( 



PAGE 1

include "config.inc";
$mysqllang = "select ID from Penelitian where No=144 or No=785 or No=85 or 
No=1 or No=755 or No=246 or No=198 or No=239 or No=795 or No=275 or No=560 
or No=743 or No=269
or No=715 or No=52 or No=788 or No=313 or No=752 or No=624 or No=205 or 
No=713 or No=717 or No=276 or No=53 or No=754 or No=277 or No=433";
$result = mysql_query($mysqllang); 

echo "";
echo ""; 

for($x=0;$x<$row=mysql_fetch_array($result);$x++){
		echo "";
} 

echo "";
echo "";
	echo "";
echo "";
echo "";
mysql_close($conn);
?> 


PAGE 2 


include "config.inc";
for ($x=0;$x<27;$x++){ 

$mysqllang = "Delete From Peneliti where ID=$deleted[$x]";
mysql_query($mysqllang);
printf ("Records deleted: %d\n", mysql_affected_rows()); 

$mysqllang2 = "Delete From Penelitian where ID=$deleted[$x]";
mysql_query($mysqllang2);
printf ("Records deleted: %d\n", mysql_affected_rows()); 

}
?> 

Need help .., Please.. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Delete From Array

2003-02-03 Thread Remon Redika
sorry everyOne..
I have Found the answer..
Problem Solved..,
And Topic Canceled..
thanks.. 


Remon Redika writes: 

Hi EveryOne..,
I need your help..
I am Using 2 Pages for Deleting rows..  

In Page 1 Like This Below. (I am displaying The ID of table ..)
and my Page 1 Will Post to Page 2
in Page 2, I've Tried to Deleting Rows..
But I Can't Deleted the Rows... :(  

 

PAGE 1

include "config.inc";
$mysqllang = "select ID from Penelitian where No=144 or No=785 or No=85 or 
No=1 or No=755 or No=246 or No=198 or No=239 or No=795 or No=275 or No=560 
or No=743 or No=269
or No=715 or No=52 or No=788 or No=313 or No=752 or No=624 or No=205 or 
No=713 or No=717 or No=276 or No=53 or No=754 or No=277 or No=433";
$result = mysql_query($mysqllang);  

echo "";
echo "";  

for($x=0;$x<$row=mysql_fetch_array($result);$x++){
		echo "";
}  

echo "";
echo "";
	echo "";
echo "";
echo "";
mysql_close($conn);
?>  


PAGE 2  


include "config.inc";
for ($x=0;$x<27;$x++){  

$mysqllang = "Delete From Peneliti where ID=$deleted[$x]";
mysql_query($mysqllang);
printf ("Records deleted: %d\n", mysql_affected_rows());  

$mysqllang2 = "Delete From Penelitian where ID=$deleted[$x]";
mysql_query($mysqllang2);
printf ("Records deleted: %d\n", mysql_affected_rows());  

}
?>  

Need help .., Please..  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Variable

2002-08-14 Thread Remon Redika

this is the form
 -- insert.php  


 Nama Satu
 
   
 
   
 Nama Dua
 
   
 
   
 Nama Tiga
 
   
 
   
 variable and my query -- 

$Namak = $namasa;
$Namak = $Namak.$namadu;
$Namak = $Namak.$namati; 

$query  ="Insert into Kel (NIP,Id_kel,Nama,Status)";
$query .="Values ('$NIP','$Id_kel','$Namak','$Status')"; 

the problem is my query cant execute the variable $Namak
i got failed message from mysql query 

help 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] using variable ..help

2002-08-28 Thread Remon Redika

I wanna do with my  bgcolor trough my array 




   ">
blablabbaba


 


I have look my view source output my TR bgcolor , and i found this below
 

I want my  bgcolor display with one by one like this below





 

etc 

help please.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: using variable ..help

2002-08-28 Thread Remon Redika

Thank you for u'r advanced,
it's works correct... 

 

regard 

me. 

Stas Maximov writes: 

> Remon, 
> 
> Your code works correct, cause you coded it this way as it should go through
> the array and output every element in the array into one line.
> If I got your idea correctly - you probably want you rows to be of two
> different colors. You may do it simplier way:
>  
>   $mycolor = array("#E8D0E8", "#F8EFF8");
> $index = 0;
> while ($row=mysql_fetch_array($result)) { ?>
> 
>  blablabbaba
> 
>  
>  
> 
> The "$index&1" construct will return either 0 or 1 for even and odd rows, so
> the proper color will be selected. 
> 
> HTH, Stas 
> 
> - Original Message -
> From: "Remon Redika" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 28, 2002 2:46 PM
> Subject: [PHP] using variable ..help 
> 
> 
>> I wanna do with my  bgcolor trough my array 
>>
>> 
>> 
>> 
>>>  }
>> ?>">
>> blablabbaba
>> 
>> > }
>> ?>
>>  
>>
>>
>> I have look my view source output my TR bgcolor , and i found this below
>>  
>>
>> I want my  bgcolor display with one by one like this below
>> 
>> 
>> 
>> 
>> 
>>  
>>
>> etc 
>>
>> help please. 
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php 
>>
>>
>  
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Maybe a stupid question but can it be done?

2002-09-23 Thread Remon Redika

I just run two insert to do that.
with two different sql syntax ... 

 

Chuck PUP Payne writes: 

> Ok, Let's try this again, for some reason this didn't post from early today. 
> 
> I have db that has two tables that I am needing to post the same information
> into both tables, I can't use ID. So I am want to see if there is a sql
> statement that will let me or how I can do with a php page. 
> 
> I am sorry to ask, I have looked around to see if there any on the net or in
> my mysql and php books but this seems like a weird task. 
> 
> Chuck Payne
> Magi Design and Support 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: html input and php (newbie), ask more

2002-09-24 Thread Remon Redika

i have tried to change post file from input.php3 to input.php
and it's done.
i wanna ask more .., why if i used post var to input.php3 the script doesn't 
work. and i got message 


Method Not Allowed
The requested method POST is not allowed for the URL /input.php3. 

 
Apache/1.3.26 Server at www.reymond.com Port 1000
 

 if ($submit == "click"){
>   echo "Hello, $UserName";
> }
> else{
> ?>
>
> 
><--input.php3 
> 
>   Enter Your Name
>
> 
>   
>   
>
> 
>   
>  } 
> 
> ?>
 

Anna Gyor writes: 

> Hi, 
> 
> I just began to learn php and I have te following code. How can I get the
> input field value in the php script? Because my script doesn't work.
> $UserName is always an empty string. 
> 
>  if ($submit == "click"){
>   echo "Hello, $UserName";
> }
> else{
> ?>
>
> 
>
> 
>   Enter Your Name
>
> 
>   
>   
>
> 
>   
>  } 
> 
> ?> 
> 
>  
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] newbie question

2002-10-03 Thread Remon Redika

I am newbie in php
I have var $query_string in my address page.
I want get value of query string.
For example I give string on my query string like 
www.mypages.com?var=numberx
I just want get a value of var or "numberx"
I usually do this var on asp
request.querystring("var") , so I'll get the value = "numberx"
how i do it on php...?
sorry about my English. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Thank's

2002-10-03 Thread Remon Redika

Okay, IC  thank's 
:) 

Scott Houseman writes: 

> This is very simple 
> 
> To access variables from GET form, which you would use 
> request.querystring( ) for in ASP,
> use the $_GET array in PHP, e.g. $var = $_GET{'var'}
> To access POST form values, which you would use request.form( ) for in 
> ASP, use the $_POST
> array in PHP e.g. $var = $_POST{'var'}. 
> 
> Cheers! 
> 
> Scott 
> 
> On 10/2/2002 1:24 PM, Remon Redika wrote:
>> I am newbie in php
>> I have var $query_string in my address page.
>> I want get value of query string.
>> For example I give string on my query string like 
>> www.mypages.com?var=numberx
>> I just want get a value of var or "numberx"
>> I usually do this var on asp
>> request.querystring("var") , so I'll get the value = "numberx"
>> how i do it on php...?
>> sorry about my English.
>  
> 
> -- 
> ////
> // Scott Houseman //
> // Jam Warehouse http://www.jamwarehouse.com/ //
> // Smart Business Innovation  //
> // +27 21 4477440 / +27 82 4918021//
> //// 
> 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Foreach ...... Help

2002-11-06 Thread Remon Redika
I am Newbie in PHP
My Problem It's Too Hard to Explain but i'll try its.. 

I have Two Text Fields
The First Text Field i call it "InputX", the amount of InputX is Constant,
and The Second Text Field I Call it "InputY", Generatable Field 

I have the Button usefull for Generated "InputY" (so If I Click The Button 
It Will Produce amount of "InputY"). i call the 

Button "AddRow" 


I need to insert data from that form to the server, the script will save the 
value of Fields ("InputX" and INPUTY") by once 

submit.
And the amount of value of data saved depent on how many "InputY" I have. 

This The sample of Value Of The Fields will saved into the server, if user 
click 5x "AddRow's Button". 

INPUTXVALUE INPUTYVALUE
INDEXSUB1
INDEX	 	   SUB2
INDEX		   SUB3
INDEX	 	   SUB4
INDEX		   SUBX 

i have done before with my asp script. and it's Worked.
<%
i = 0
Inputx = request("Inputx")
dim vary(100)
for each y in request("InputY")
	vary(i) = y
	i = i + 1
next
for each x in request("inputY")
	insertq = "Insert into Nsoftware(X, Y) values ('" & Inputx & "','" & 
vary(i) & "')"
	set save = conn.execute(insertq)
	i = i + 1
next
%> 

I try this script with php, but i found an Error. 


$vary(100);
$i = 0; 

foreach($InputY as $y){
	$vary($i) = $y;
	$i++;
} 

foreach($Nama_Software as $x){
	$insertq = "Insert into NSoftware (X, Y) values ('$InputX','$vary($i)')";
	echo $insertq."";
	mysql_query($insertq);
	$i++;
} 

Sorry it's to many CopyPasting.., 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Foreach ...... Help

2002-11-06 Thread Remon Redika
Parse error: parse error, unexpected '=' in 
/home/intra/Inventroot/software/savedata.php on line 35 


$vary(100);
$i = 0; 

foreach($InputY as $y){
  $vary($i) = $y;   <-line 35
  $i++;
} 

foreach($Nama_Software as $x){
  $insertq = "Insert into NSoftware (X, Y) values 
('$InputX','$vary($i)')";
  echo $insertq."";
  mysql_query($insertq);
  $i++;
} 

?>
Thank's 


Jon Haworth writes: 

Hi Remon, 

I try this script with php, but i found an Error. 

It would be helpful if you could show us this error message. 

$vary(100);


At the very least, you should change this line to  

$vary = array(); 

Cheers
Jon 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Foreach ...... Help

2002-11-06 Thread Remon Redika
Sorry before.
I Just to try to Explain my Problem
may be this my reason .. 

I have Two Text Fields
The First Text Field i call it "InputX" 
and The Second Text Field I Call it "InputY", Generatable Field (using 
javascripts), if User Click the Button ("AddRow's Button") for Generated / 
produce the InputY, may be like the sample..
Blabla.innerHTML = "" ; 

I need to insert data from Fields to the server, the Code will Post the 
value of Fields ("InputX" and "InputY(s)") by once submit to the server, and 
amount of value of data saved depent on how many "InputY" I have, or how 
many times User click my "AddRow" Button and fill Text Fields. 

This The sample result data will send to server in once post data, if user 
click 5 Times "AddRow's Button". and fill it's with these value 

INPUTXVALUE INPUTYVALUE
INDEXSUB1
INDEXSUB2
INDEXSUB3
INDEXSUB4
INDEXSUBX 

i have done before with my asp code. and it's Worked.
<%
i = 0
Inputx = request("Inputx")
dim vary(100)
for each y in request("InputY")
  vary(i) = y
  i = i + 1
next
for each x in request("inputY")
  insertq = "Insert into Nsoftware(X, Y) values ('" & Inputx & "','" & 
vary(i) & "')"
  set save = conn.execute(insertq)
  i = i + 1
next
%> 

I just to translate from asp code to php code
I try this code with php, but i still found an Error. 


//$vary(100);
$i = 0; 

foreach($InputY as $y){
  $vary[$i] = $y;
  $i++;
} 

foreach($InputX as $x){
  $insertq = "Insert into NSoftware (X, Y) values 
('$InputX','$vary[$i]')";
  echo $insertq."";
  mysql_query($insertq);
  $i++;
}
?> <--- 55 

Parse error: parse error, unexpected $ in 
/home/intra/Inventroot/software/savedata.php on line 55
i got error out of range of my code..,
or may be these not a good idea to translate my asp code to php??
sorry about my english 

Rasmus Lerdorf writes: 

Your code is bogus.  You probably want: 

  $vary[$i] = $y; 

And $vary(100) also makes no sense. 

Also, why are you looping through the $InputY array and putting all the
values into $vary?  Why not just do $vary = $InputY;  ? 

If it is because you need to renumber the indices, have a look at the
array_values() function. 

-Rasmus 

On Thu, 7 Nov 2002, Remon Redika wrote: 

Parse error: parse error, unexpected '=' in
/home/intra/Inventroot/software/savedata.php on line 35 


$vary(100);
$i = 0; 

foreach($InputY as $y){
   $vary($i) = $y;   <-line 35
   $i++;
} 

foreach($Nama_Software as $x){
   $insertq = "Insert into NSoftware (X, Y) values
('$InputX','$vary($i)')";
   echo $insertq."";
   mysql_query($insertq);
   $i++;
} 

?>
Thank's 


Jon Haworth writes: 

> Hi Remon,
>
>> I try this script with php, but i found an Error.
>
> It would be helpful if you could show us this error message.
>
>> $vary(100);
>
> At the very least, you should change this line to
>
> $vary = array();
>
> Cheers
> Jon
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php