How Do I Make A Normal Textlink That Submits A Form?
I've got the following search form:
<form name="search" method="get" action="main.php">
<input type='text' name='searchquery' size=ཇ' value='Search'>
<input type="submit" name="Submit" value="search">
<input type="hidden" name="section" value="home">
<input type="hidden" name="topic" value="search">
<input type="hidden" name="subtopic" value="results">
</form>
Now I want, instead of the grey submit button, a normal (text) link that can submit this form. I see this on many sites but I have no idea how to make such a 'submit link'.
Some people said it has something to do with an onClick() function, but they don't know the value for it.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Server-Side Form Submission - Form Submits To Form, Which Autosubmits. BAD!
I have a php form from which the user fills out their name and address and clicks "Submit". The form goes to a page that stores the data in a mySQL database, then, using hidden fields, populates another form and actives with a javascript onLoad=submit() to send the information on to the final destination. I cannot control or edit the final destinations web page, which is why the interim page is needed. What I would like is for the user to fill out the form, and upon submission have the data recorded into the database and have the data passed on in a "form like way" on to the final destination BY THE SERVER, not by the use of a hidden form page that auto submits. Any suggestions? Here is the interim page's code below: <? $link = @mysql_connect($db_host_name, $db_name, $the_decoded_password) or die; @mysql_select_db($db_name) or die; $query = "INSERT INTO web_link VALUES ('', '$a', '$b', '$c','$d', '$e', '$f', '$g', '$h')"; $result = @mysql_query($query) or die; ?> <html> <head> </head> <body onLoad="document.contactme.submit();"> <form name="contactme" method="post" action="http://www.test.com/cgi/storethisdata" > print "<input type="hidden" name="first_name" value="$first_name"><br>"; print "<input type="hidden" name="last_name" value="$last_name"><br>"; print "<input type="hidden" name="email" value="$email"><p>"; print "<input type="hidden" name="phone" value="$phone"><p>"; ?> </form> </body> </html>
Form With To Submits, Which One To Default To?
Say, I have a form. Both cancel and save (in that order) are submits, then in the code I check which button was pressed. The point is that I want the save button (2nd) to be default, not the cancel. Is there a way (in js?) to "focus" the other button? One other way to be some simple js, which submits the page anyway......
Form Submits Every Time You Request Something From Another Class?
I have html form from time to time I access methods from class forms since it contains all of the function are needed to work with forms. in the form it self I request 2 different functions from class form, the thing is when I press submit button, the form submits it self the ammount of times as the function that request data from forms.php class. Code:
PHP Form To PDF File - How Do I Make PDF Secure?
I have a simple PHP form that grabs names and emails of everyone that wants to download a PDF file. When the required info is entered into the form, it gives them a link to the PDF which they can download (no problem so far). However if they then wanted to send that PDF URL to other people, they could just bypass the form and just download the PDF directly. I’ve seen references to this question in a few places, but no answers, can someone give me some ideas how I secure the PDF, or guide me to a tutorial?
How To Make PHP 'grab' Variables From A WML Form
I really can't get forms to pass data to my scripts. Now someone mentioned something about grabbing it and posted some code, but for the life of me I cannot find the email/post/whatever the hell it was, so can someone please tell me how a PHP script can be made to 'grab' a variable from a form.
Could Someone Show Me How To Make A Form Handler?
I have tried and tried, but I can't seem to make a php form handler. I would love it to be able to check for required fields, and to be able to show the viewer their information before it is submitted, so they can make changes before it is submitted.
How Do You Make A Form Unusable By Spammers Please?
How do you make a form unusable by spammers please? Hi all, I'm desperately trying to get a php form to not be used by spammers, I don't want anything to do with javascript or captcha's. Can anyone please let me know what changes I would need to make to the code on the link below?
How To Make A Form In Php Accepting Indefinite Inputs?
I was trying to figure out how to make such a form: Data: [ ] [add][done] When I enter a data and click the [add] button, the data gets added to a list (and preferably the updated list is displayed on the same page). This repeats until I click [done] button.
Explode What The User Submits
I have an form that inserts stuff into the table but one of fields could have a "/" in it so in my insert script page I have all m y insert script stuff. You'll notice that I put in the explode stuff but perhaps not in the right spot and in my sql statement I just put $positions rather than '".$positions."'
2 Submits Useing The Same Inputs....?
I have a page that has like 50 inputs... (to create an image) so many that I want a preview button and a submit button the submit will add the info to the database like it should but the preview button will make a pop up with a new page my problem is that i need all the info sent to both pages....if they click preview i need all the inputs send to preview.php and if the user clicks submit i need all the inputs to go to generate.php how do i do this?
Multiple Submits Broken In PHP5
I have a page with multiple submit buttons. Call them "ok" and "cancel". I have the coding in PHP as: if (isset($ok)) { something } and if (isset($cancel)) { something else } This works fine in PHP 4.X. In PHP5 it doesn't work at all (no action at all). What is the replacement coding and how can I code so that it works in all versions of PHP?
Using '$' In Normal Text
// set the file name $filename = config.php"; // open the file $handle= fopen($filename,'a'); // create the string $string = "$dbhost="localhost"; $dbuser="user"; $dbpass="dbpass"; $dbname="dbname";" // write the string to the file handle fputs($handle, $string); // close the file fclose($handle); In the above script I am trying to generate a config.php file populated with db variables. Problem is, this part ($dbhost="localhost";
Normal SQL Query Won't Work?!
The page "news.php" can have the following functionality: 1. news.php outputs a general "this is the newspage"-text (left column) and lists the 5 latest news (in the right column) 2. news.php?action=archive lists alla news i database (left column) and 5 latest (in right column) 3. news.php?action=item&newsID=n shows single news (bases on newsID) and 5 latest news i right column. Depending on which URL-string news.php gets, a different function gets executed. I know that the function (and the URL-stringJ works, since I did a simple test with "echo"-strings. However, when I add the code below, the page will not render properly. PHP Code:
Normal Error 404 Page
how would i go about getting the location of the current error 404 document for some directory with php? looking at the .htaccess file for a given directory isn't gonna do it because the error 404 document could have been assigned in some preceeding directory, or somewhere else...
Custom Fields - When User Submits It Goes To Admin's Email Or PM
I would like to create another page on my phpBB that would have customizable fields that users could enter information into and then submit the page. The info would then be sent to the Admin's email or PM. Here's a screenshot to illustrate, this would be a registration for a car show: <snip> Any ideas how to add these custom fields and then submit to an email or PM?
Counter Script Inside Normal Html
I am trying to include a counter script inside normal html. I have my counter php script called counter.php i then have a index.html file that i would like to include the counter in. I have coded like this in the html file: <?php include("counter.php"); ?> If I run the counter.php page on it's own, it links to mysql and returns the desired result.
Converting Time Stamp To 'normal' Date Function
I'm looking for a bit of code/formulae to convert unix time stamp info into a conventional date format. I have a file that generates invoices from data requested from an sql table - trouble is it brings in the date as a timestamp. I'm looking for something I can plug into the php invoice file rather than altering the database.
No Libphp4.so File Created In Make Intstall Or Make.
I have done a make, and a make install on the 4.3.6 version, using /usr/local/etc/php as the directory I make from. However, no matter what I do, I do not see a php4lib.so that has been created. The documentation I recieved (an IBM source) says that the following has to be added to the httpd.conf file : LoadModule php4_modulelib/apache/libphp4.so .. .. .. AddModule mod_php4.c here is the output from my make install : [root@mail php]# make install Installing PHP SAPI module: cgi Installing PHP CGI into: /usr/local/bin/ Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar - already installed: 1.1 [PEAR] Console_Getopt - already installed: 1.2 [PEAR] PEAR - already installed: 1.3.1 Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path [PEAR] DB - already installed: 1.6.2 [PEAR] HTTP - already installed: 1.2.2 [PEAR] Mail - already installed: 1.1.3 [PEAR] Net_SMTP - already installed: 1.2.3 [PEAR] Net_Socket - already installed: 1.0.1 [PEAR] XML_Parser - already installed: 1.0.1 [PEAR] XML_RPC - already installed: 1.1.0 Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config program: phpextdist
What Are Normal Ways To Scale Up PHP's Default Settings For Growing Traffic?
PHP comes with certain defaults, set in php.ini. Among these, scripts time out after 60 seconds, I think. The default memory limit for a script is, I believe, 8 megs. I assume that when people do large-scale sites with PHP they scale these numbers up. If you have a content management system running every aspect of a large corporate web site, including a database back end that employees use for important, secret, protected information, then I imagine there is quite a lot of processing that might be needed for every request. A limit that I run into all the time is the memory limit. If I get a large amount of info back from the database, and then try to store the return in an array, it is easy to go over the default 8 meg limit.
How To Make A "sophisticated" Insert Record Form ?
I have a DB with many inter-related tables (MySQL) My main table called "content" has almost only foreign keys (integers) some have a 3 level relation (ex: content->city->region->country) I would like admins to be able to insert new records including all the "content" fields (in 1 page form) But how can I make an insert form that would display the related tables as list menus instead of a textfield with a number? (ex: select country from a drop down menu instead of typing the foerign key number) Main content Table: IDRef = primary key IDLocation = foreign key --related to tables city->region->country IDDescription = foreign key --related to table Description (=several big and small text fields) IDImages = foreign key --related to image (=image and thumbs path, alt text, etc..) Do you know any tutorial, help or solution ?
Attaching A String To A Normal Word Without Loosing The String
In my database I have content rows that are either called <contentname>_title or <contentname>_fulltext. now when someone clicks a link on the site it goes to index.php?action=<contentname> so I guess you see where im going.. when someone goes to such a section index.php sees $action is used and attaches it to _title and _fulltext, so u get: $action_fulltext.. basicly of cuz php now sees it as one string '$action_fulltext' and not '$action'_fulltext.
Displaying Priorty Records And Normal Records In The One Dataset.
I have a page which displays the records from the database and uses paging to display the records in groupes of 10 per page. I now want to be able to show results depending on the database field (display) in the database (can be set to either "full" or "limited"). If the record and the field display is equal to "full" i want to then display this record at the top of the record set and display all the fields. If the record is equal to "limited" i want to display different results and they must show after all the records which are equal to "full". I can't output two different recordsets as i use paging and only want to show 10 records per page. Code:
Possible To Make Thumbnails?
Hello all! Do you think it's possible to use a kind of php code or a special package or something to make thumbnails from a large image with php?
Make Table Appear On Top
i made a php with just a table and included all the material with php include http://www.hbksite.com/index2.php but here is the problem when i got to it the menu appears in the middle is there any way to make it be always on top please help here is the code:
Make A Graphic
i have to make a graphic with data coming from a mysql database... i'll use php ...it is for a web site ...it is a linegraph ...does someone know how to do that ?
Need To Make An IP Ban Mask
I need to create a small PHP script for my site that allows me to ban certain IPs. Ive created a script that reads a file, and if the IPs in the file match the user IP, they cant access the site. However, i want to take this one step further, and allow masks to be specified. What i mean by this is i'd like to be able to put in the banfile something like: 111.111.111.*, and it would then ban anything in the range 111.111.111.0 - 111.111.111.255.
Can PHP With AJAX Make Changes To The Url?
I am currently doing a forum script project (using PHP/MySQL, and hopefully, some AJAX). One concern is that if AJAX can handle $_GET and output its content to the url? Say if my forum index page is called index.php, then if I click on a thread, it displays the thread AND changes the url to index.php?postid=1 Is this possible? FYI, I plan to use Xajax library.
How To Make New Variable
how do I change this to the new variable so I don't get the error message, I want to have the settings like this for security reason: error_reporting = E_ALL register_globals = off so I get a clean code. if(!$aa)$aa=0; $result = mysql_query("SELECT * FROM forum where ny =Ƈ' order by nr desc LIMIT $aa,10") or die (mysql_error()); <form name="forum" method="POST" action="<?=$PHP_self?>?aa=0"><div align="center"> $i ++; this is the lines I get the error.
How Do You Make Something Alternate...
I'm using the while() function to get posts out of a database, they are each in their own table, and I want the tables to alternate from $color1 to $color2 like this forum does when reading a thread on all the posts, how can I do this?
How Can I Make A Bar Graph In Php?
I have a poll section in a website and I want to show a bar graph illustration of the results. example if 40% of voters voted for yes and 60% is No, I can show also the bar graph of the percentage of the votes.
How To Make A New Database?
I want to make a new database with several tables, so I did the following: <?php CREATE DATABASE bedrijf; CREATE TABLE werknemers (voornaam varchar(15), achternaam varchar(20), leeftijd tinyint(3), adres varchar(30), woonplaats varchar(20), land varchar(20)); ?> What is wrong with this, and do you know another way to make a new database? Is there a site that explains all about myadmin?
Make Php Faster?
I've been recently testing a little few things with php (mainly speed). On thing I've noticed is that php is incredible SLOW to start up. Compared a perl script and php script aside of each other. In case of my system it took perl roughly 6ms , but php over 30ms . php only got activated things like MySQL, ming en pdflib. Ok, the runnings time are pretty short, but I try to make things as efficient as possible. Mainly because it is for a production server and can't predict what customers will do. Are there ways to get php at least to catch up with perl's speed?
Make Uppercase?
How would I go about making all the text in a field go to uppercase before it goes into the MySQL. I know where to inseert the code I just dont know what the code is?
How To Make Uppercase
How could i make the following Term 1 "UNITED STATES" read "United States". Term 2 "SPAIN" read "Spain". I know it needs to like say all to lowercase then 1st to uppercase and then how do i get the second part of united states?
Make Formula
I am trying to write formula in php but two days work and nothing please someone help. Here is formula how look mathematic: here is how look in dynamic: A=((N*(100-d)/100)*r*(1+r/1200)^(12*y))/(1200*((1+r/1200)^(12*y)-1)) here is how I write in php: (($_POST['N']*(100 - $_POST['d'])/100)*$_POST['r']*(1+($_POST['r']/1200)pow(12*$_POST['y'])/(1200*((1+$_POST['r']/1200)*(12*$_POST['y'])-1));
How Do I Make The Date Appear Only Once Each Day?
I'm new to coding so pardon me if this is a simple questions. On my blog, I'm trying to get the date to appear once per day with all posts under that date appearing underneath the date. Does anyone know how I could accomplish this?
Is It Possible To Make Your Own Function For Encryption?
I am sorry for bringing up *yet another* post about encryption, but I was just curious. Is there a way to make your own encryption function? I mean, that would make it more secure than anything, right? Since no one else would have that encryption key or whatever? Is there a way to look at the current encryption functions like MD5 or crypt? I know it's a lot more complicated than a=1 and b=2, but I think it'd be cool if I could come up with my own form of encryption (with the help of a professor, of course)!
How Do I Make It To Show The Next Record?
Can someone please tell me how to create a link that when clicked will go to the next record. Also, I know how to display search results, when mine are displayed, there is only one record showing, how can I make it so that there are more records show?
Get_free_uid() Can't Make It Work =[
Hi all, I'm attempting to find a free UID for a user by searching an LDAP directory and comparing the UID's returned to a random number to see if the random number is free. The function I wrote doesn't seem to be working. Does anyone have any suggestions as to how to fix my code, or a better way of doing this? With a pertanent example?
Make All Variables GLOBAL
In functions, is there a way to make every variables global without having to delclare every single one of them in the function?
How Can I Make Arabic Web Site.?
Hello Experts,I have to make such type of interface,you can say it a html form.in which a admin can write arabic data and can insert that data orrecordsin database in PHP.and i have to make a show.asp in which user can see that arabic datain table from database on internet.FOR english version i have make that project completely.but i have to make that project in arabic also.Actually client want this project in english and as well as inarabic.so that admin can insert data in arabic also.I will upload that web site on internet.i know how to insert data and how to show data from database.but the problem is that,i don't know what r the requirmentsto insert arabic data in database on internet and what r the requirmentstoshow arabic data in table from data base.
How To Make Sure External URL Is Reachable?
Is there any simple method in php to determine if a url from a website is reachable? This is so that if your website has to load content from another URL, is there a failsafe method for the other parts of your website to load even if that one part is down?
|