I'm new to php and need some pointers to worth while documentation 'cause I'm getting nowhere I want to make a simple html form that allows me to submit a csv file so that I can work on it.The problem seems to be that if the file is not in the root of the (web) application it won't work.The form doesn't seem to send the path with it so I am unable to (1) know where the file is, I just get the name of the file and (2) I couldn't access the file anyway as it's outside of the apache environment.Is there a way to up the file to memory? How would you do this
I can easily surf along to the URL [URL] and click the submit button which pokes script.php and everyone's happy. Automating this in iMacros or Selenium - no problem.
I want to automate this in a bash cron on the same server - preferably as a one-liner.
Browsing some websites I've found a code for online form where a user provides name, number, etc. Everything is created in html/javascript. I'm just wondering whether it's possible to collect this input and present it in a database form so that I'd be able to see who's provided data and all the details they entered.Actually, it doesn't have to be a proper database (it would probably require php/mysql). It could be a weekly/monthly report (a text file) of people who provided details. The website is hosted by a third party company.This is an html bit:
I have a 20TB filesystem, xfs formatted. The filesystem has been mounted with the inode64 option, and I now need to NFS export it. NFS doesn't like the inode64 option at all. The NFS clients cannot access any of the directories with inode numbers exceeding the 32bit limit. They get the "Stale NFS file handle" message. I have tried to attach the filesystem to a RHEL5.3 system, and after turning on the no_subtree_check option in /etc/exports on the server, it all works fine. No changes were needed on the clients.
The problem is that I need to get this to work on a RHEL4.4 system. Unfortunately I cannot do any test on that system yet, I then did a quick test on a RHEL4.3 system... and it didn't work. Even using the no_subtree_check option was on any help. I am afraid that this will not work on the RHEL4.4 system either. How to get the inode64 xfs filesystem NFS exported on a 2.6.9 kernel?
I've already tried Seamonkey to create a web page but can find no way to create a web form in which I want to create form fields. Before moving to Ubuntu I used Microsoft FrontPage to create web pages with form fields. This was easy to do. what is available to do the same in Ubuntu?
We are using several printers on our Linux RH network to print customer invoices and receipts. Receipts are short forms of just 21 or 22 lines. Two of the printers (an HP LJ1300 and a Dell 5200) eject the receipt paper automatically; the other two HP (a LJ 4200 and a LJ2420) do not eject. You have to press the green button on the printer. Is there a solution to that? They are all set up with the same PCL settings.
I want to validate a web form using PHP. I spent ages confusing myself with client side scripting and realised until I worked out it is not what I want. My problem is that now I am looking at PHP and everything is mixed up in my brain. I need to point out that PHP is very new to me! This is what I already have: 1 An html page with my form on it. 2 PHP page which emails the contents of the form to me.
The above works well. For the sake of clarity, here are my pages (cut down to the essentials where appropriate): My html form: first name surname Email Home phone Mobile Work phone
I have read and understood your terms and conditions. My php script (regform.php) $receiver = 'me@email'; $subject = 'New registration'; #$message = 'This is a new registration.'; $surname = $_POST['surname']; $firstname = $_POST['firstname']; $address = $_POST['address']; $email = $_POST['email']; $homeph = $_POST['homeph']; $mobileph = $_POST['mobileph']; $workph = $_POST['workph']; $time = $_POST['time']; #from here $oldaddress = $_POST['oldaddress']; $DOB = $_POST['DOB']; $elect = $_POST['elect']; $job = $_POST['job']; $salary = $_POST['salary']; $employer = $_POST['employer']; $benefit = $_POST['benefit']; $smoke = $_POST['smoke']; $claim = $_POST['claim']; $children = $_POST['children']; $children2 = $_POST['children2']; $pets = $_POST['pets']; $pets2 = $_POST['pets2']; $require = $_POST['require']; $terms = $_POST['terms']; $rooms = $_POST['rooms']; $body = "first name:$firstname surname:$surname DOB:$DOB email:$email home phone:$homeph mobile phone:$mobileph work phone:$workph address: $address time at this address:$time previous address:$oldaddress electoral register:$elect employment:$job employer:$employer salary:$salary benefit claim:$benefit future benefit:$claim children:$children ages:$children2 pets:$pet pet type:$pets2 other requirements:$require terms:$terms"; $headers = 'From: email' . " " . 'Reply-To: email " " . 'X-Mailer: PHP/' . phpversion(); mail($receiver, $subject, $body, $headers, "From: $firstname $surname " . "Reply-To: $firstname $surname class="inlineimg" />;
You can see there are many more form fields than I have shown in my example html form above. What I want is that the following fields have to be filled: 1 mobileph 2 email 3 terms (checkbox) I would like the user to be asked to fill the form in properly if any/all of the 3 fields have not been filled in. I imagine I need some php in the html page and some more in the php page. I am certainly not asking any one to do this for me but I am really confused. I have googled and copied and pasted and edited for 6 hours and I am lost. What I want is a very simple and clear example of the code needed. Sorry if I sound as if I can't search properly on Google: in this case I clearly can't!
Im strugling with script that wil generate graph on demad. I put it in cgi-bin directory but cannot get it to work. i googled for perl generating images and tried few examples but none worked.
When I execute perl script in command line it throws picture i a bunch of characters so it creates it but wont show when I access it through a web page.
I am trying to process an email form using PHP.It is working okay so far but I want the Items to be displayed as a list when the email is received. eg.
one two three four
and not
one two three four
here is a copy of the variable that displays the message
Sometimes the variables will be 0 and sometimes not, and of course the output may also be 0%...What is the best method to handle division by zero errors in awk.
Just trying some programming with PHP. I need to write javascript code that contains some PHP code. The page extension is .php. I need to get the values from the HTML form text boxes in PHP variables without the click of submit button. I know there are these $_REQUEST, $_POST and $_GET functions that can do this. But they need a server hit for that. I need to somehow do it without hitting the server or hitting the server from javascript.
For a search box on my site, I want a textbox, which will let the user input the term to be searched for, and next to it I want a drop down list that'll have, for example, "Fruit" and "Vegetables" as categories to be searched within. How do I do the HTML for this? (so that the arguments to my search.php script will be eg. "search.php?text=apples&type=fruit" ? )
I have a HTML <form> with two (input type text), and a submit button, after I enter the two values and click submit button, the x.php appear successfully but the HTML <form> still remain in the x.php page,how to hide the form from the x.php page
I would like to make program that reads a *.TXT file and searches for last line and constatly refreshing the search. So last line would look something like this:Mike Had A 100.0 Pound Shark.So there are multplie category of "fish"(Shark, Dolphin, etc.) and each of them have allowed weight (ie. minimum 70.0 Pound Shark, 50.0 Pound Dolphin). If in the found sentence Shark or Dolphin doesn't meet requierments than program named False.exe should be started. I dont know how to make it my self so any help is much appreciated. My knowledge on programming is very low but I'm opend for learning.
I can't get x to work with a mouse so I have to use a windows computer to do that from for now. The problem is I remember there being something about windows using a newline AND carriage return and linux just using a newline. I was about to cut and paste code but the lines go on and on instead of breaking off where they did in linux. I was going to write a perl script but don't know how to add a carriage return to the end of each line.
i'm trying to create simple form that will also upload only xml data. first, the user will need to upload an xml document only by clicking submit, the data will be posted to the server and the user will be redirected to uploader.php. This PHP file is going to process the form data and do all the work.
I want to write simple firefox extension / script or anything to change URLs from HTTP to HTTPS for selected websites (e.g. facebook). That thing is actually bypassing some security checks in my network.
Can anyone tell me how to proceed? I can deal with language as far its C++ or Python (something else would just take more time that's all )
I need to make a daemon which listens to port 81 for messages like [URL] So far I made a daemon which serves as a simple stream server: I set up a socket to listen to a non-reserved port (like 9999), but I don't know how to read the query strings.
I have a file with 200 000 lines and I want to append the fields of each line based on matching first field. The resulting file should have 70 000 columns but has "only" 18 000. The command I'm using is working perfectly with a smaller file, wich lead to 14 000 columns. Could there be a limit in number of fields that awk can handle ? Here's my awk command :
Code:
awk -F, 'END { for (k in _) print _[k] } { _[$1] = $1 in _ ? _[$1] FS $4 : $1","$4 } ' file > out
Also, this command writes ^M (windows line break) after each columns. Removing them is easy but where do they come from ? Working on Ubuntu 10.10
I have a script that that is supposed to send me an e-mail when a host is not responding to ping:
The script works fine when I execute it directly but when cron executes it, the ping error is never picked up by the script so the if statement is ignored.
My issue is I can't handle the files with spaces in their name, I've donde the below script to print each file found inside folder and subbfolders with "find".
I would like to "ls" to each file found with its complete path and with its basename too.
Code: files=$(find . -type f) for each in "$files" do ls -l "$each" # 1rst option I've tried to list with full path ls -l "$(/bin/echo "$each")" # 2nd option I've tried to list with full path ls -l "$(/bin/echo $(basename "$each"))" # 1nd option I've tried to list with it basename
[Code].....
How can I list "ls -l" in both cases (with full path and with basename) when there are files with spaces in their name?
A question of ODBC correctness - maybe someone knows.
Code: // statement handle is sth, connection handle is dbch SQLExecDirect(sth, ...); // ... bind var, fetch results ... SQLFreeHandle(SQL_HANDLE_STMT, sth); // free statement handle SQLEndTran(SQLHANDLE_DBC, dbch, SQL_COMMIT); (error checking removed for clarity).
To my mind this seems wrong - surely the statement handle should be free'd only after the commit is done? Or maybe not. I theorize about the ODBC library like this: a whole set of statements can be created, run, executed in one transaction (which is held at the connection level), and only after all that is a commit/rollback done. So maybe it's OK. Even so it still feels weird. What is written above works, but there are rare and very difficult to replicate problems with this code, and I wonder if a premature free might be the cause...?
I currently have a home network setup so that my main machine shares it's external hard-drive via NFS. This has been working perfectly for months, however I just got a new laptop, installed openSuse 11.3 x64 and set everything up. Now there is two folders on the external network mount that won't let me do anything and always just return Networking: Stale NFS File Handle. The system still works fine under my old openSUSE 11.2 x86 laptop. I have tried unmounting the drive from the laptop, restarting the NFS client, and restarting the NFS server on the main machine. None of these have made a difference.
It is only these two folders that are effected. Everything else works just fine.