Get all uploaded files [closed] - php

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I'm uploading several files and I need to process all of them. But they have "unknown" names back in the form and simple foreach is not working.
<input type="file" name="somethingIDontKnow">
<input type="file" name="somethingIDontKnowAgain">
...
I need to know the name parameters of inputs. Can I get them somehow?

Oh, I forgot to add enctype="multipart/form-data" parameter to <form> so I didn't get any files. It's ok now.

Related

Get Value of array with multiple values [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
i know that has to be a trivial one. Can please somebody tell me how only to get the value of skills? how can i access it?
Appreciate.
You have different options to choose from:
In plain PHP you can do:
$skills = array_map(function($entry) {
return $entry->skills;
}, $arr);
With Laravel helpers you can do:
Arr::pluck($arr, 'skills');
Your data looks like models so in that case, you might be able to do this as well:
YourModel::get()->pluck('skills'); //or
$yourCollection->pluck('skills');

PHP - Variable from form not staying after refresh, or not appearing at all [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I am testing PHP and the variable from the form is not staying, and does not appear even on the same page. Here is the code:
<?php
echo "<form action='input.php' method='post'>Test: <input type='text' name='last' </form><input type=submit>";
echo "<h1>The last input was: </h1>", $_POST["last"];
?>
This is not a PHP problem. It is an HTML problem.
Your submit button is outside of the form.
It's effectively "submitting" a blank, empty, made-up form of its own.
That made-up form does not contain any of your data.
Move the submit button to inside of the form.

What is the "returnto" in this piece of code [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
header("Location: {$TBDEV['baseurl']}/login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]));
Is it a variable? PHP reserved word? something to do with HTML?
It's a $_GET parameter. When you submit the code, the page receiving it will be able to use $_GET['returnto'] to return you to the page you're currently on.
Take some time to learn about $_GET

Action in form using PHP [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have a problem. Because i'm new in PHP, i don't know whether this is right or wrong syntax. Form it's not working.
<form name="edit_client" method="post" action="index3.php?page=del&id=<?php echo $row['id']; ?>&action=edit">
No problem with that.
<form name="edit_client" method="post" action="index3.php?page=del&id=<?php echo $row['id']; ?>&action=edit">
Just missed a = after id

$_GET function not working for my wordpress website [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
Here is the URL:
localhost/wordpress/?page_id=51.html?err=Please%20Enter%20your%20Password%20Confirmation
Here is the code that is not working:
<h2 class="site-description2">
<?php if(isset($_GET["err"])) echo $_GET["err"]; ?>
</h2>
Thanks in advance. Appreciate all help.
separate $_GET parameters with &
localhost/wordpress/?page_id=51.html&err=Please%20Enter%20your%20Password%20Confirmation

Categories