Re: [PHP] PHP form not working

2005-08-02 Thread hope


u can also work out like this:


$email_err ="Please enter your email address!/span>/>";


$message_err = "Please enter a message!";



this wil also work perfectly alrite.

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



[PHP] Re: can't find the parser error

2005-08-04 Thread hope


well u have a parse error in ur TESTARRAY.PHP file



within the foreach loop
u hav writen

 print "$day"

while here u must also terminate it through semi-colon like this

   print "$day";

This wil solve the problem 
Now it wil work










zedleon wrote:


I am having trouble finding the parser error in this small test script. Any
help would be appreciated
I am pulling in an array from this html form.




Event Name: 
Week Days
S
M
T
W
T
F
S






testarray.php







print "You want to add an event called
   {$_POST['name']} which takes place on: ";




if (is_array ($_POST['weekdays'])) {



   foreach ($_POST['weekdays'] as $day) {
   print "$day"



}



} else {



   print 'Please select at least one weekday for this event!';



}



print '';



?>


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



[PHP] re: parallel execution of code

2005-08-09 Thread hope

U might try omthing like this::

$query = "SELECT id FROM mytable WHERE bla LIKE " . $x .";

$result = mysql_query($query, $cnn) or die(mysql_error());

$totalRows_result = mysql_num_rows($result);

if($totalRows_result>0) 
		
{ 


  //display error tht id already exists
}
else
{

  //insert code goes here
}

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



[PHP] changes in php.ini

2005-08-26 Thread hope

Hi all

Whenever I create a site
and create a index.php file as my home page.

Whenever i run it a http://localhost/myproject/


it says Page cannot be found

However if I have index.html file 
it displays.


SOmebody told me that i need to make changes to php.ini

bt where and what to change there.


Regards
Hope 


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



Re: [PHP] changes in php.ini

2005-08-26 Thread hope
Nops 
I m using IIS 



Hope


Jasper Bryant-Greene wrote:


hope wrote:

Hi all

Whenever I create a site
and create a index.php file as my home page.

Whenever i run it a http://localhost/myproject/


it says Page cannot be found

However if I have index.html file it displays.

SOmebody told me that i need to make changes to php.ini

bt where and what to change there.


You don't need to change php.ini, you need to configure your server (is 
it Apache?) to display index.php files as the DirectoryIndex. If it is 
Apache, then either insert the following line in the relevant part of 
httpd.conf for that virtual host/directory, or put it in an .htaccess 
file in the root of your web application:



DirectoryIndex index.php



Jasper


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



Re: [PHP] changes in php.ini

2005-08-26 Thread hope

ya php is working fine


Raz wrote:


Have you tested to make sure that php is actually working yet?



Raz


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



[PHP] passing values from dynamic form to another php page?

2005-09-15 Thread hope

hi

i  m generating a dynamic form (no. of fileds depend upon user selection 
from previous page).

On this page user enters values into form fields
and i want to acess them on next page.
///file1.php

/

$cID=$HTTP_POST_VARS['select1']; //echo $cID;
$query1 =  "SELECT * FROM categories where cat_id=$cID" ;
$result1 = mysql_query($query1, $cnn) or die(mysql_error());
$row1=mysql_fetch_array($result1);
$cat_name=$row1['cat_name']; //echo $cat_name;
$cat_image=$row1['cat_image']; //echo $cat_name;
$cat_intro_text=$row1['cat_intro_text']; //echo $cat_name;
$attributes_list =$HTTP_POST_VARS['sql_query'];
echo $attributes_list;
$fldslist=split(",",$attributes_list);
$fldCount=count($fldslist);
$_SESSION['num_fields']=$fldCount;
$_SESSION['list_fields']=$fldslist;
?>




enctype="multipart/form-data" >


 
  
 color="ff">Welcome to the Administration 
Panel

  
  
   

   
   
   
   
  

   
  size="+1">Category:  $cID.". ".$cat_name;?>

   
   
  

  
 
   cellpadding="0">

 
    
    
 
 
 
   src="../images/categories/" width="80" 
height="100">

    
		?>

 
 
    
 
    
 
   
 
  
  


   
  Product 
Attributes

   
   


   
  
  	cellspacing="0">


		for ($i=0;$i<$fldCount;$i++)

{
echo "$fldslist[$i]";
}   
?>
Action


		for ($j=0;$j<$fldCount;$j++)

{
		echo "maxlength='8'>";


}   
?>
	onClick="return validateForm(this)" onKeyPress="return validateForm(this)">





  
   
   


   
   
   
   
  

   
   
   
   
      
 




//
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page 
in this context??


regards
hope

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



Re: [PHP] passing values from dynamic form to another php page?

2005-09-16 Thread hope

Quite rite.
Well i have used this on my next page:

global $HTTP_POST_VARS;
$num_fields=count($HTTP_POST_VARS);
while(list($key, $value) = each($HTTP_POST_VARS)) 
{ 
	echo "$key = $value";

  /or whatever coding i want to do//
} 


regards
hope


Jay Blanchard wrote:


[snip]
enctype="multipart/form-data" >




//
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page 
in this context??

[/snip]



Look in the $_POST array (which matches the form method) on the next page.
For example;






print_r($_POST);



?>


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



[PHP] update page n display

2005-09-28 Thread hope

i have a text area on my page.
As page is uploaded it displays certain text in it.
It has also has a text area with same text that is being displayed above 
in the page .

If user changes this text of text area  n presses submit button
the page needs to display updated text in the text area
and as well as updated text above in the page.

2ndly the text area must display text alogwith tags
e.g 


heading

this goes text



but above in the page these tags must like  
mustnt be displayed instead the heading word must become of h1 format.

how can i get all tags like   etc. as enterd by user

n how to update the page n display updated text?

regards
hope

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



[PHP] updating forms

2005-09-29 Thread hope

i have a text area on my page.
As page is uploaded it displays certain text in it.
It has also has a text area with same text that is being displayed above 
in the page .

If user changes this text of text area  n presses submit button
the page needs to display updated text in the text area
and as well as updated text above in the page.

2ndly the text area must display text alogwith tags
e.g heading

this goes text



but above in the page these tags must like  
mustnt be displayed instead the heading word must become of h1 format.

how can i get all tags like   etc. as enterd by user
coz if i get it on next page n save it database,
the next time wen i wil dsiplay there wil be no brs .


n how to update the page n display updated text?

regards
hope

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



Re: [PHP] convert array to HTML GET request

2005-10-03 Thread hope

on 2nd page you can use

global $HTTP_POST_VARS; 
print_r($HTTP_POST_VARS);


/// u can use $HTTP_GET_VARS for GET method

regards
hope 


adriano ghezzi wrote:


if i understand well you need to get an array from html post




if you use the same name for your html fields you automatically have
an array in $_POST



eg



input type=text  name=myfield value="field_1"
input type=text name=myfield value="field_2"



you'll get the array  ar_myfield = $_POS['myfield']



you should achieve the same result using myfield[key] in the name of html



hyh



by ag.




2005/10/2, Martin van den Berg <[EMAIL PROTECTED]>:

Newbe question:

How does one convert an array into a HTML GET request easely? Are
there any standard functions?

Same for HTML POST requests.

Thanks,

Martin.

--
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