Hi friends,
I am new to PHP. i need validations for Delete a record.
i store a column from Database table in a tabular format. i have edit and delete option. i need to write validations confirm (yes or no to delete the record) my code goes like this::::::
echo "<td width='68' ><a href='index2.ph p?option=com_qu alification&cid =$cid&type=dele te'> Delete</a> </td>";
// how to write validation in the above href and where to place it. plz suggest.
Regards,
Ram
8 1530
Hi.
Is it what you are looking for?
[HTML]<a href="index2.ph p?option=com_qu alification&cid =$cid&type=dele te" onclick="return confirm('Delete item?');">Delet e</a>[/HTML]
Hi.
Is it what you are looking for?
[HTML]<a href="index2.ph p?option=com_qu alification&cid =$cid&type=dele te" onclick="return confirm('Delete item?');">Delet e</a>[/HTML]
hi satas,
i am getting the error, can u correct me where i am going wrong! plz
Parse error: syntax error, unexpected T_RETURN, expecting ',' or ';' in
Try this:
[PHP]echo "<td width='68' ><a href='index2.ph p?option=com_qu alification&cid =$cid&type=dele te' onclick='return confirm(\"Delet e item?\");'> Delete</a> </td>";[/PHP]
Markus 6,050
Recognized Expert Expert
hi satas,
i am getting the error, can u correct me where i am going wrong! plz
Parse error: syntax error, unexpected T_RETURN, expecting ',' or ';' in
Ramu, how are we supposed to know where that error is? We aren't psychics.
Post the relevant code and post the full error statement.
Ramu, how are we supposed to know where that error is? We aren't psychics.
Post the relevant code and post the full error statement.
Hi friends,
i able correct my code with help of SAMAS. thanks samas.
its first time, sorry, i will post my code with error from next time.
good day.
Try this:
[PHP]echo "<td width='68' ><a href='index2.ph p?option=com_qu alification&cid =$cid&type=dele te' onclick='return confirm(\"Delet e item?\");'> Delete</a> </td>";[/PHP]
hi satas, can we write our own validation, i mean writing function like this::
onclick="gotode lete(row(id))";
can u help me out here.
with 'return confirm' i am not able to delete the record. But i am showing alert message and when pressing ok button , the page is just refreshing.
plz satas.
Hi Ramu528.
You should insert URL to some script that will delete the record.
e.g. < a href="delrec.ph p?rowid=1">dele te</a>
In delrec.php you should receive rowid parameter and perform necessary actions.
After that you can return to previous page by using:
[PHP]header("Locatio n: http://blah-blah.com/index.php");[/PHP]
Hi Ramu528.
You should insert URL to some script that will delete the record.
e.g. < a href="delrec.ph p?rowid=1">dele te</a>
In delrec.php you should receive rowid parameter and perform necessary actions.
After that you can return to previous page by using:
[PHP]header("Locatio n: http://blah-blah.com/index.php");[/PHP]
Thanks Satas. I could complete my task with ur cooperation. thanks alot.
All the Best
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ing. Rajesh Kumar |
last post by:
Hi everybody
Validation controls are great but i have a scenario where i do not know how
to use them so i am doing my validation on the server.
Let's say I have a Web Form with :
Two Textboxes : Textbox_1, Textbox_2
Two Checkboxes : Checkbox_1, Checkbox_2
A Button : btnSubmit
What I want is :
If Checkbox_1 is checked then Textbox_1 is required and it should contain
|
by: Paul |
last post by:
This is what I am trying to do
*********************************form1***********************
Control 1 required field validator 1
Control 2 required field validator 2
Submit button 1 (works only if control 1 and 2 inputs are correct does not check control 3 or 4 input)
Control 3 required field validator 3
Control 4 required field validator 4
Submit button 2 (works only if control 3 and 4 inputs are correct, does not check...
|
by: Matt Mercer |
last post by:
Hi,
My first post here. I am a self-taught, very "green" web developer. It
is not the main focus of my job but required from time to time.
I am developing a web application that logs security incidents for my
company. Here is a little background on how it works. I am using ASP
..net and VB. The user first submits a new incident which has several
required and not required fields related to the incident. The new
incident is written to a...
|
by: Barbara Alderton |
last post by:
I setup some standard Required Field Validation controls and one Custom
validation control on an ASP.NET page (within a user control) to validate
text entry. I also setup a Summary Control to post all the messages to a
message box (ShowMessageBox=true). The required field validation error
messages show up in the summary just fine but I can't get the custom
validation message to show up if invalid.
So far I have the summary control...
|
by: Pat |
last post by:
its seems asp.net validation doesn't fire when using FireFox?
Tested a page and it doesn't fire.
It seems the javascript doesn't fire
Any ideas?
| |
by: Bill Long |
last post by:
I have a control that simply displays a list of links. Following one of the
links doesn't post back or redirect to another page, it simply hides the
current panel and shows the one you selected... So the behavour is similar to
a tab control.
The user is expected to fill out required data on each of the panels before
pressing a submit button which is visible from all panels.
Problem I have is validating the data entered by the user. I...
|
by: winnie_us99 |
last post by:
Hi All,
I am trying to do validation on my text field before going to the
next page to create a user. It doesn't look like the next button will
fire any validation. Am I missing something? Can anyone please help me
with this?
I am attaching my code piece. Thank you in advance for your help.
Wing
|
by: gweasel |
last post by:
What is the best way to apply a Validation Rule - or rather, where is
the best place to put it? Is there an advantage to putting it on the
field in the table vs setting the validation rule on the form the
control is on?
Basically I have a number of controls in a form that are required, and
to check it I am setting the Validation Rule to "<>"IsNull" so that
when the user tries to tab through/click out of a required area
without entering...
|
by: ak1dnar |
last post by:
Hi, I got this scripts from this URL
There is Error when i submit the form.
Line: 54
Error: 'document.getElementbyID(....)' is null or not an object
What is this error.
Complete Files
|
by: tanish2k |
last post by:
hi.
I am using c#, visual studio 2003.
I need to validate a xml file against schema which itself has 2 more schema imported under it.
i have following 2 xsd files :
xsd1 --->
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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
|
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...
| |