• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 34
  • Last Modified:

pass array of inputs to another php page

i need to make search i wil take the inputs to another page

i have java code conflict so i will go another page how to da?
1 Solution
Chris StanyonCommented:
You can pass your inputs to another page by simply POSTing a form.

<form method="post" action="anotherpage.php">
    <input type="text" name="firstName">
    <input type="text" name="lastName">
    <input type="submit" value="Go">

Open in new window

When you click on the Go button, the info entered into firstName and lastName will be sent to anotherpage.php as part of the $_POST array:

$_POST['firstName'] = "Some Value"
$_POST['lastName'] = "Some Value"
AHMED SAMYownerAuthor Commented:
thanks but you came late i have this code

first page
$Mixed = array("1","1","1");
$Text = json_encode($Mixed);
$RequestText = urlencode($Text);
<a href="search.php?cluster=<?php echo $RequestText; ?>">Click</a>

Open in new window

second page is
$Text = urldecode($_REQUEST['cluster']);
$Mixed = json_decode($Text);
print_r( $Mixed);

echo $Mixed;


Open in new window

as this example i did my job

this matter al ready finished
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now