473,787 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

include function inside an isset function

92 New Member
is it possible to use an include function inside an isset function?

something like:

[php]
if(isset($_POST['submit']))
{
include("insert .php");
}
[/php]
Jan 7 '08 #1
4 2761
pbmods
5,821 Recognized Expert Expert
Heya, Backups.

Yup. In fact, just like you have there; a call to include() inside of a conditional block.
Jan 7 '08 #2
backups2007
92 New Member
What if the input type that I use is button instead of submit, will the isset function work?
Jan 8 '08 #3
Markus
6,050 Recognized Expert Expert
What if the input type that I use is button instead of submit, will the isset function work?
Nope. It is not good practice to check whether the form is submitted through the the 'submit' button because, as we know, there are many other ways of submitting a form.

Iff you're going to use a regular type=button ( i shall assume you're doing some sort of validation before submitting ) you should check for some other element and see if that is selected. eg. a 'terms and condition' select box.
Jan 8 '08 #4
backups2007
92 New Member
what shoulf i use then? i need to use two buttons with different actions. could i use the if(isset()) condition? and what input type should i use?
Jan 9 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2922
by: lawrence | last post by:
I've this function, which is the method of a class. I'm posting the constructor of the class down below. For some reason, when I fill out a form and hit submit, I'm not getting any values. Can someone tell me why? function getVar($var="password") { // 05-08-03 - the important thing about this function is it reverses
5
1835
by: Ken | last post by:
Hello: I'm writing my first php app and I have a problem. Initially I put template type strings, such as HTML Headers and page footers in a MySQL table and called them up with a php SQL query to include them in the printed HTML, This worked great but then I learned about includes and I tried using includes to put them into the HTML. 1. I assume that this is faster than the query method because that's what people seem to do. Am I...
3
3111
by: .Net Sports | last post by:
I want to include some asp if statements inside a do until loop, predicated on the recordset going until EOF. I do not have any < % %> delimiters inside the include file. The below doesnt show the character I want to display: <% do until rs.eof response.write rs("position") <!-- #include file="inc_.asp" --> loop %>
3
7658
by: Mike | last post by:
I'm new to PHP - moving over from ASP. I have a number of include files, the first of which sets the value of a variable $loginmsg. I use that variable in a subsequent include file, but get a "Notice: Undefined variable loginmsg" warning. I've had a good look at previous posts concerning this warning, and see that isset() is recommended to prevent this kind of warning. Is this totally necessary? In ASP, and include file becomes...
2
6313
by: salvadorvp | last post by:
Hi, I have the following code that gives me this odd error message at a line of code inside the PEAR libraries: "Fatal error: Call to undefined function: MDB2_Driver_mssql::getMessage(). in C:\php\PEAR\lib\MDB2.php on line 1921" My code is a simple submit processing form for a login page: <?php
11
26642
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
10
2363
by: SoulIntruder | last post by:
Hello folks. I have a beginners question. I have such script: <?php $User = $_POST; $Password = $_POST; $Database = $_POST;
25
2269
by: Mark | last post by:
so, i'm making a website. let's say i have header.php, footer.php and content.php. now in index.php I simply want to include the 3 pages. easy enough to do. but let's say the user navigates to mysite.com/content.php. now the header and footer will appear to be missing. so now the question is, how can i include the header and footer in content.php only if the page isn't already nested?
1
6473
by: Beamor | last post by:
function art_menu_xml_parcer($content, $showSubMenus) { $doc = new DOMDocument(); $doc->loadXML($content);//this is the line in question $parent = $doc->documentElement; $elements = $parent->childNodes; need help. my site worked fine on my localhost but when i uploaded it to my live server i keep getting this error need help to recode line to match my hosting server. im using php 5 i have attached the common_method file
0
10169
jinu1996
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...
1
10110
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,...
0
9964
tracyyun
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...
0
8993
agi2029
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...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.