I know how to use php/mysql, but the html aspect of
what Im trying to do (if its even possible this way) is what Im unsure
of.
I want to have a button that a user can hit to valid mysql info before
submitting the full page of info. I know this doesnt work, but
something like the following:
<form method=POST action="http://mysite.com/send.php">
<input type=text name=user>
<button>
<?php
.... do mysql lookup here and let user know 'user' is
valid....
?>
</button>
..... many more input types here ...
<input type=submit name="Submit">
</form>
Im unsure if A) it will work this way and B) how do even do this?
Will it work this way? If so what do I fill in in the button area?
Ive wondered if I need/should use javascript, but in looking around
the web it seemed that wouldnt work easily, or would it?
I know that the 'user' information is posted in the FORM, so Im unsure
how to get it into the php section anyhow.
Thanks for any help 2 2056
Bob wrote:
I know how to use php/mysql, but the html aspect of
what Im trying to do (if its even possible this way) is what Im unsure
of.
I want to have a button that a user can hit to valid mysql info before
submitting the full page of info. I know this doesnt work, but
something like the following:
<form method=POST action="http://mysite.com/send.php">
<input type=text name=user>
<button>
<?php
.... do mysql lookup here and let user know 'user' is
valid....
?>
</button>
.... many more input types here ...
<input type=submit name="Submit">
</form>
Im unsure if A) it will work this way and B) how do even do this?
Will it work this way? If so what do I fill in in the button area?
Ive wondered if I need/should use javascript, but in looking around
the web it seemed that wouldnt work easily, or would it?
I know that the 'user' information is posted in the FORM, so Im unsure
how to get it into the php section anyhow.
Thanks for any help
As this is an HTML question, not a PHP one, might I suggest a more
appropriate newsgroup - such as alt.html?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
On 15 Sep, 18:31, Bob <j...@rahul.net wrote:
I know how to use php/mysql, but the html aspect of
what Im trying to do (if its even possible this way) is what Im unsure
of.
I want to have a button that a user can hit to valid mysql info before
submitting the full page of info. I know this doesnt work, but
something like the following:
<form method=POST action="http://mysite.com/send.php">
<input type=text name=user>
<button>
<?php
.... do mysql lookup here and let user know 'user' is
valid....
?>
</button>
.... many more input types here ...
<input type=submit name="Submit">
</form>
Im unsure if A) it will work this way and B) how do even do this?
Will it work this way? If so what do I fill in in the button area?
Ive wondered if I need/should use javascript, but in looking around
the web it seemed that wouldnt work easily, or would it?
I know that the 'user' information is posted in the FORM, so Im unsure
how to get it into the php section anyhow.
Thanks for any help
I suspect you're a bit confused about the relationship between what
happens serverside and what happens client side:
The server geenrates a page of HTML, then the client displays it.
There are ways to make things happen serverside without refreshing the
page - using Ajax or hidden iframes or tying code execution into other
operations triggered by javascript such as reloading an image.
I assume that you are presenting a form for the user to fill in, then
submitting it for some sort of validation prior to submitting it to be
saved.
While it is possible to do this (and its possible to code a static
javascript function which will work regardless of the specifics of the
form) a better solution would be just to use two submissions.
The key to working out the best method depends on knowing whether the
user will always be able to write the data in the final step.
C. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Xizor |
last post by:
Ok, I'm new to PHP and MySQL. I've been going through tutorials, reading the
documentation, and looking through web sites. PHP to me seems great! With
MySQL it seems even better.
However, I'm an experienced C++ programmer. This has allowed me to see many
potential areas where the security of a server can be compromised through
loopholes in PHP. Granted, with the right knowledge these potential threats
can be avoided. But I've just...
|
by: Mike Ho |
last post by:
I'm wondering if there is a way to retrieve Foreign Key declaration
information on both MyISAM and InnoDB tables.
Of course, I understand that MyISAM doesn't support Foreign Keys,
however, it does still parse FK declarations within a CREATE TABLE
statement, and moreover, it even creates an index on the column that
is the Foreign Key.
So my question is for this sample CREATE TABLE declaration:
|
by: lawrence |
last post by:
Is this the correct way to test for a method before I use it?
createRange() is, I believe, an IE only method.
function wrapSelectionInTag(selection, tag) {
if (document.selection.createRange) {
var range = document.selection.createRange();
if (range.parentElement() == element) range.text = '<' + tag +
'>' + range.text + '<\/' + tag + '>';
}
|
by: John Boy |
last post by:
Hi,
Can anyone help. This is really doing my nut in. 3 years ASP exp. and
now doing .DOT which is a step in the wrong direction.
Basically I am left with the code of a guy who has left. When I click a
button on a pop-up window the javascript for that button click does a
'button.form.submit'. On the Server side there is a Button click event
for this button, but for some reason it no longer fires. It worked fine
before and everything...
|
by: SJ |
last post by:
Hope someone can help me out there I'm struggling with a particular
problem...
I have a form with many tab pages. On one tab page I've got a button
which when clicked with a mouse adds items into a datagrid. When a
user presses the enter key on this button I want the mouse click event
to be activated but instead the tab page's validating event is called.
I understand that this behaviour is by partly by design (Accept button
etc) but I...
| |
by: Patrick [MSFT] |
last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature
of another language (Dexterity used by Microsoft Dynamics) and so while a
filling a drop down list is a workable solution I'd rather do it like
Microsoft Dynamics does and use separate textbox and lookup button.
What I have is, simply, is a C# winform, a textbox and a pushbutton.
On the textbox, on the validating event of the textbox I check my customer
table...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer must be embedded somewhere in the source code, and I would like to know if anyone knows where to find the correct answer.
I would greatly appreciate it!!
Thanks!!
<!--put the preloads file here as it must load before the website class...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer must be embedded somewhere in the source code, and I would like to know if anyone knows where to find the correct answer.
I would greatly appreciate it!!
Thanks!!
|
by: Jeff |
last post by:
I know how to use php/mysql, but the html aspect of
what Im trying to do (if its even possible this way) is what Im
unsure
of.
I want to have a button that a user can hit to valid mysql info
before
submitting the full page of info. I know this doesnt work, but
something like the following:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |