forms

$_SERVER['PHP_SELF'] not working [closed]

我的梦境 提交于 2020-01-17 16:37:21
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . Im sorry if this kind of question has been asked before. but i spent much time searching for but I could not find the solution. so i'm posting here..

Storing form data with PHP Session

给你一囗甜甜゛ 提交于 2020-01-17 14:01:32
问题 I am working on an HTML form whose data would be saved on a failed submit, or page refresh. We are using a PHP Session to store this data, and we post the elements back when needed. The issue is that it's not working. We need the form data to be preserved on a submit with errors, or page refresh. Currently on a failed submit, or page refresh, there is no data being stored in the session. I'm fairly new to PHP, and most of this code is not mine, so go easy on me. The PHP Sumbit code being used

Insert one or more sets of fields into database using dynamic form

本秂侑毒 提交于 2020-01-17 08:06:30
问题 This is my second post on the same issue, in my first post I was using mysql instead of mysqli so I have made some updates according to recommendations. I have a form with variable sets of fields (1 to 20 sets) controlled by the user via javascript. Without the dynamic content all works well. After I changed my html form from city to city[] it obviously stopped passing the data to my database. I have tried all sorts of ways to make this work with no success. Any ideas? Form manipulation: var

Is there a way to limit number of submissions for a php form?

醉酒当歌 提交于 2020-01-17 07:46:10
问题 eg. A registration form can only be used x amount of times? 回答1: Quick and Dirty Solution For PHP. Everytime they visit a page, it increments the counter. Too many times means the page die() s. You can choose to put this code in a spot where it will only be executed when someone submits the form. It resets the count every so often. Known Bugs: Clearing Cookies breaks it, having cookies off breaks it. <?php session_start(); if(!isset($_SESSION['count'])) { $_SESSION['count'] = 1; $_SESSION[

How to get the Multi Values multi fields

冷暖自知 提交于 2020-01-17 07:36:36
问题 i have a form and I repeate the same fields because i don't the user if he has more than one Item to send the first Item and he do agin and agin i want it from the first time to add the all items he has, so i put the same Required fields more than once. <form> <select name="items[]"> <option value="clothes">Clothes</option> <option value="shoes">Shoes</option> </select> <input type="text" name="color[]" /> <select name="items[]"> <option value="clothes">Clothes</option> <option value="shoes"

How to get the Multi Values multi fields

耗尽温柔 提交于 2020-01-17 07:36:12
问题 i have a form and I repeate the same fields because i don't the user if he has more than one Item to send the first Item and he do agin and agin i want it from the first time to add the all items he has, so i put the same Required fields more than once. <form> <select name="items[]"> <option value="clothes">Clothes</option> <option value="shoes">Shoes</option> </select> <input type="text" name="color[]" /> <select name="items[]"> <option value="clothes">Clothes</option> <option value="shoes"

how to create Multiple choice google form from spreadsheet

非 Y 不嫁゛ 提交于 2020-01-17 07:35:34
问题 I would like to create a MCQ from an existing spreadsheet that has this type of data : Question Choice 1 (correct answer) Choice 2 Choice 3 Choice 4 Question 1 a b c d Question 2 d a b c Question 3 b a b c Thank you for your answer Chris, but this code : function createForm(){ var form = FormApp.create('New Form'); var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var range = sheet.getRange(2, 1, sheet.getLastRow()); var values = range.getValues(); for (var i = 0;

Why isn't my form submit button not going to a next page when I click on it?

不打扰是莪最后的温柔 提交于 2020-01-17 06:31:09
问题 I am trying to figure out why the form's "submit this form" button is not taking me to another HTML page I specified in the <form ... action="submit form.html" method="get"> attribute and not only that but when I put wrong first names, email addresses, and order numbers, and date of orders, it doesn't return JavaScript messages I specified in my if-else codes using JavaScript. Here is the JavaScript code I use on the form. var $ = function (id) { return document.getElementById(id); } var

Not saving, no error message

一曲冷凌霜 提交于 2020-01-17 04:45:29
问题 On form submission, it's telling me that it was successfully created but it's not showing any data that was submitted. The database is empty. It's showing "null" values and the same on the actual screen where I should be able to edit the data. Here's a screenshot Update: I think the problem is that it's making a GET request but I don't know how to fix it. Here's a screen shot of my server doing a get when I clicked the submit Here's the set up In the index action of results_controller.rb, I

Radio Boxes not resetting to “checked” status in Firefox

佐手、 提交于 2020-01-17 04:40:14
问题 I'm lost as to why my radio box form isn't working in Firefox 7.0.1, but works fine in IE, Chrome and Safari. The problem is that the radio boxes which are "checked" aren't resetting to what the HTML shows. For example, if I change the temperature setting from "f" to "c" and and press Select, the action script sees the correct values. I then press Back in FF and refresh the window, "c" is still selected. As stated, this works as expected in other browsers, but not in FF. I'm having a hard