Programming :: Form To Submit Csv File To Handle?

Jul 25, 2010

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

View 3 Replies


ADVERTISEMENT

Programming :: Click 'submit' In A Remote Web Form From Bash?

May 26, 2011

I have created a simple web form which pokes a PHP script:

<form name="update" action="http://www.mysite.com/script.php" method="POST">
<input name="submit" type="submit" value="submit">
</form>

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.

I *thought* something like this might work:

Code:
wget --spider --post-data="submit=submit" http://www.mysite.com/wget.html

or

Code:
curl -d "submit=submit" http://www.mysite.com/wget.html

and many variations thereof but no luck.

Is there ANY way I can click the submit button from a Bash command line? Curl, wget, lynx - one of these simply MUST be capable of this.

I do not want to run script.php from the command line - there are loads of relative links etc.

View 14 Replies View Related

Programming :: Save Input From An Online Form To A File/database?

Jan 27, 2010

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:

Code:
<body id="main_body" >
<img id="top" src="top.png" alt="">

[code]...

View 4 Replies View Related

Programming :: Submit Job To Queue?

May 15, 2011

Is there a more convenient way or function call to submit a job to a queue than the following in Linux?

Code:
#include <stdlib.h>
...
system( "at -f /var/myproj/task_starter.sh now" );
...

View 2 Replies View Related

Red Hat :: Inode64 XFS File System And Stale NFS File Handle Message

Jan 12, 2011

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?

View 1 Replies View Related

Ubuntu :: Webpage Editor To Create Form And Form Fields?

Jun 10, 2010

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?

View 2 Replies View Related

General :: Stale NFS File Handle - How To Delete File

Jan 21, 2010

How do I delete a file if it happens like this.
-????????? ? ? ? ? ? temp.cgi

View 5 Replies View Related

Hardware :: No Form Feed After Printing Short Form?

Aug 13, 2010

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.

View 3 Replies View Related

Programming :: Form Field Validation Using PHP

Sep 10, 2009

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!

View 2 Replies View Related

Programming :: Generating Grpah Form Rrd On The Fly?

May 9, 2010

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.

[Code]...

View 3 Replies View Related

Programming :: Process An Email Form Using PHP?

Jan 21, 2009

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

View 14 Replies View Related

Programming :: How To Handle Division By Zero In Awk

May 29, 2011

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.

View 2 Replies View Related

Programming :: HTML Form Data In PHP Without Postback?

Feb 9, 2010

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.

View 14 Replies View Related

Programming :: Two Elements Inside A Form In HTML?

Sep 18, 2010

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" ? )

View 3 Replies View Related

Programming :: Convert A String To Its Binary Form?

Jun 9, 2010

Like the binary form of the integer '2' is '10',

How should I find out the binary form of a string say "abcd" ?

View 11 Replies View Related

Programming :: Html <form> Doesn't Disappear After Using It?

Apr 15, 2010

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

View 7 Replies View Related

Programming :: C++ Search And Handle Information

Sep 26, 2010

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.

View 1 Replies View Related

Programming :: Make Date Of Birth Form In Html

Jun 2, 2011

How to make Date of Birth form in html....in short codes.....?

View 1 Replies View Related

Programming :: Adding Form Feed After Newline For Windows?

Apr 27, 2010

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.

View 3 Replies View Related

Programming :: Create Simple Form That Will Also Upload Only Xml Data?

Nov 24, 2010

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.

PHP Code:

[code]....

View 1 Replies View Related

Programming :: Firefox Extension To Handle URLs?

Jan 11, 2011

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 )

View 1 Replies View Related

Programming :: Handle Query Strings Using Socket?

Dec 7, 2009

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.

Linux distro: Kubuntu 9.04
Language: C

View 5 Replies View Related

Programming :: Limit In Number Of Fields That Awk Can Handle

Mar 2, 2011

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

View 4 Replies View Related

Programming :: Bash Script Can't Handle Errors When Run By Cron

Jan 8, 2009

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.

View 4 Replies View Related

Programming :: Handle Keyboard Button Pressed Signal?

Jul 4, 2011

I'm learning Signals, and I have a question:

Is possible to make a handle when I press any of the keyboard buttons?

The SIGINT handles the Ctrl-C combination, but I want to handle if any keyboard button was pressed.

View 3 Replies View Related

Programming :: Handle Files With Spaces In Their Names In Bash?

Apr 1, 2011

*I'm using Ubuntu 10.10

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?

View 6 Replies View Related

Programming :: Need To Handle SIGSEGV Error When Pbuf Size Less

Sep 12, 2009

Need to handle SIGSEGV error when pbuf size is less than size. inside lib.:
for (i = 0; i < size; i++)
pbuf[i] = i;

View 2 Replies View Related

Programming :: UnixODBC - Commit After Freeing A Statement Handle?

Feb 16, 2011

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

View 2 Replies View Related

Programming :: Handle Non Argument Error While Adding Two Alphabets Using 'expr'

Feb 19, 2011

how to handle non argument error while adding two alphabets using 'expr' (not bc).

View 1 Replies View Related

OpenSUSE Network :: NFS Stale File Handle

Jan 20, 2011

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.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved