Hi Feherke,
Thanks very much for your reply. I followed your suggestion concerning using mysql_real_escape_string(). I got the following code off the internet and made use of it:
<html> <body>
<?php
function check_input($value)
{// Stripslashes
if(get_magic_quotes_gpc())
{ $value...
Hi, I’m new to PHP so please bear with me. I’m trying to send user input from a HTML form to a MySQL database. The database has one table with four fields (varchar(15), varchar(15), varchar(10), longtext). The HTML form looks like:
<html> <body>
<form name="index" action="Z.php" method="get">...
Hi, I'm new to Web development so please bear with me. I'm developing a web site using Visual Studio.Net. I've two problems. First, I'm able to build the web site, but when I run it in Explorer I get the error "HTTP 401.3 - Access denied by ACL on resource Internet Information Services - You are...
Hi, How do I assign the characters entered into a text box to a c-style character array? I have to do this because the library I'm using contains many functions whose parameters are c-style character arrays. I wish to say something like:
char* x = new char[20]...
I am building a class (static) library using C++ to access a database in Visual.Net. I have declared:
using namespace System;
using namespace System::Data;
below #pragma once.
I get the compiler errors:
error C2039: 'Data' : is not a member of 'System'
error C2871: 'Data' : a namespace with this...
I have two Windows Forms, say, FormA and FormB. FormA, the form that loads first in Application::Run(gcnew FormA());, has button A which when clicked takes me to FormB. Similarly, FormB has button B which when clicked should take me back to FormA. The click event for A is shown below:
#include...
I have a Windows Forms Application project with multiple forms. How can I jump from one form to another without having to create the form, that is, how can I pass a reference to Form_A to another form, say, Form_T? In other words inside Form_T instead of saying:
Form_A ^ x = gcnew...
I have placed a textbox and other controls on a form. I have the event handler:
private void textbox_KeyPress(object sender, KeyPressEventArgs e)
{
//code to ensure text entered are numbers;
}
How can I test whether a key on the keyboard is actually pressed. If the user presses no key within...
Sorry, my question was not very clear. When the button is clicked function(0) is invoked in which, the code is not shown, a label with text: "Enter an integer" is displayed.
After that appears the statements:
try
{ result = Convert::ToInt32(insrtMnytxtBox->Text);
}
catch(Exception^...
I have the following event handlers for a button and a text box:
private: System::Void button_Click(System::Object^ sender, System::EventArgs^ e)
{ function(0);
}
private: System::Void textBox_Validating(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e)
{...
Sorry, I am using C++ syntax, but it should be the same for C#. How can I call one event from within another? For example, say I have the two events, one for a button and one for a textbox.
private: System::Void Button_Click(System::Object^ sender, System::EventArgs^ e)
private: System::Void...
I am extremely grateful for all your help. I have followed your instructions and have overcome the previous errors. Can I trouble you just one more time.
The static library contains a singleton:
namespace Lorenzo
{ class VendingMachine
{ ...
After...
Thank you for your help. I have done as you suggested. In the property pages of the Forms Application, in General under C/C++ folder of Configuration Properties I have removed the relative path to the static library folder:
../ Vending Machine Library
Also under Configuration...
Hi,
I am writing a C++ console application. I would like a C-style string, say, char* message = “Beware danger!!” to blink (flash, go on and off) so as to attract the user’s attention. How might I do that? I would be grateful for all help.
Hi,
Please bear with me, I am new to Visual C++.Net. I have included two projects to a blank solution, one a static class library (named Vending Machine Library), the other a Windows Forms Application (named Vending Machine Controls). In the property pages of the Forms Application, in General...
I’m new to C#, so please bear with me. I’ve created a Windows application and inserted code, found in a book, for creating a simple word processor. I’ve placed a ToolStrip, RichTextBox (Dock property set to Fill) and a FontDialogBox on a form. Further, I’ve created six buttons on ToolStrip and...
I get the following compiler warning:
Warning C4996: 'kbhit' was declared deprecated
‘kbhit’ was used in the following code:
int s = 0;
time_t now, expire;
cout << "Enter integer: ";
expire = time(NULL) + 8; //wait for 8 seconds
now = time(NULL);
while (!_kbhit() && now <...
I have created a template storage class which contains the following function:
template<class X>
void Queue<X>::insert(X& q)
{ X* p = new X(q);
.
.
}
By invoking the copy constructor in the class plugged in for X the storage class stores an exact copy of the object passed as an...
Location Matrix::randomAdjacentLocation(Location& location)
{ int row = location.getRow();
int col = location.getCol();
.
.
}
Above ‘location’ represents an occupied point in a two-dimensional matrix. How can I use row, col and rand() to generate a (random) point that...
Hi,
Can I pass the address of a copy of a local object to a pointer? Say function someFunc(), of a container class L returns a copy of a local object of type X. X is derived from the ABSTRACT class Y.
X L::someFunc()
{ X local...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.