473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

HELP MySQL

Please can somebody explain to me how do i tell a database who has 1 table
and various fields to" accept" nr1 and nr2" take and lock "information from a register.php with a click on a buttom >

Thx in advance.

lieven@wbs.co.za

PHP IIS MySQL
Nov 22 '06 #1
6 1180
ronverdonk
4,258 Expert 4TB
I don't have a clue what you are asking. Can you explain that in plain language?

Ronald :cool:
Nov 22 '06 #2
Please can somebody explain to me how do i tell a database who has 1 table
and various fields to" accept" nr1 and nr2" take and lock "information from a register.php with a click on a buttom >

Thx in advance.

lieven@wbs.co.za

PHP IIS MySQL

Mr. Ronald , i am busy making a single regestration.php webpage.
I am using MySQL database with 1 table en several fields,
now i would like to now how do i collect de information from the webpage
in 1 time with a click buttom on the webpage.
The webpage is not on the site yet, since i still working on it.
Should you be interested, feel free to visit http://www.business-youthlink.co.za .
Hopefully i did explain it better this thime, if not i shall trail again.

THX
Nov 22 '06 #3
ronverdonk
4,258 Expert 4TB
Look at thre sample I posted on logging in a user in the HTML/CSS forum at http://www.thescripts.com/forum/post2216963-8.html

That shows you how to enter data in a form and process it when the submit is clicked.

If you have any more questions, don't hesitate to ask.

Ronald :cool:
Nov 22 '06 #4
Thanks Mr. Ronald for the php
I assume that i can put more fields than only username and password,
I must make the page now, if i do have a problem i let you now.

thx again for your help

lieven@wbs.co.za

http://www.business-youthlink.co.za
Nov 23 '06 #5
ronverdonk
4,258 Expert 4TB
You can put as many columns in as you like, it's just a sample on how to collect info from the screen and process it using the MySQL database, nothing else.

Ronald :cool:
Nov 23 '06 #6
Hello mr.ronald ,its me again, lieven
I did look at the page that you give the shortcut from,
i did put the not fully finished page on the net.
Wanted to ask you to have a look at it.
The database is find on my pc, i am using dreamweaver and for testing purpose
only in from the first table i use name, trading as and CC.
http://www.business-youthlink.co.za/register.php
I changed this from origanale register.html ,just to keep the page equal to all
the pages.
Mr Ronald, allow me to go back now to my 1,2 question.
One other thing mr. ,is het normal that the php from within dreamweaver
together with the recordsets comes before the html. i don t now maybe i am not
explaining this to well.
Allow me to put the whole page on this message, maybe this would be better.
I still have a lot to learn .



-----------------------------------------

Expand|Select|Wrap|Line Numbers
  1.    <?php require_once('Connections/nafcocyouth.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
  5. {
  6.   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  7.  
  8.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  9.  
  10.   switch ($theType) {
  11.     case "text":
  12.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  13.       break;    
  14.     case "long":
  15.     case "int":
  16.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  17.       break;
  18.     case "double":
  19.       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
  20.       break;
  21.     case "date":
  22.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  23.       break;
  24.     case "defined":
  25.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  26.       break;
  27.   }
  28.   return $theValue;
  29. }
  30. }
  31.  
  32. mysql_select_db($database_nafcocyouth, $nafcocyouth);
  33. $query_Recordset1 = "SELECT companyprofile.name FROM companyprofile";
  34. $Recordset1 = mysql_query($query_Recordset1, $nafcocyouth) or die(mysql_error());
  35. $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  36. $totalRows_Recordset1 = mysql_num_rows($Recordset1);
  37.  
  38. mysql_select_db($database_nafcocyouth, $nafcocyouth);
  39. $query_Recordset2 = "SELECT companyprofile.tradingas FROM companyprofile";
  40. $Recordset2 = mysql_query($query_Recordset2, $nafcocyouth) or die(mysql_error());
  41. $row_Recordset2 = mysql_fetch_assoc($Recordset2);
  42. $totalRows_Recordset2 = mysql_num_rows($Recordset2);
  43.  
  44. mysql_select_db($database_nafcocyouth, $nafcocyouth);
  45. $query_Recordset3 = "SELECT companyprofile.CC FROM companyprofile";
  46. $Recordset3 = mysql_query($query_Recordset3, $nafcocyouth) or die(mysql_error());
  47. $row_Recordset3 = mysql_fetch_assoc($Recordset3);
  48. $totalRows_Recordset3 = mysql_num_rows($Recordset3);
  49. ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 //EN">
  50. <HTML>
  51.  
  52. <HEAD>
  53. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-etc etc etc etc etc
  54.  
  55. etc etc etc etc etc
  56.  
  57.  
  58.  
  59.  
  60.             <TD><IMG SRC="images/space.gif" WIDTH="43" HEIGHT="1"></TD>
  61.             <TD><IMG SRC="images/space.gif" WIDTH="96" HEIGHT="1"></TD>
  62.         </TR>
  63. </TABLE>
  64.         <script language="javascript1.2" src="menu.js"></script>
  65. </BODY>
  66.  
  67. </HTML>
  68. <?php
  69. mysql_free_result($Recordset1);
  70.  
  71. mysql_free_result($Recordset2);
  72.  
  73. mysql_free_result($Recordset3);
  74. ?>
  75.  
-----------------------------------------------------------------

Sir like i mentioned, only three recordsets i put insite.

-How do i bring this details to the database with entering or with a maybe(submit) buttom.

-How do i make sure that all details are put before it can be submitted?

-Is it normal and allowed that php falls above and under the HTML heading and footer or must i maybe change the html detals to ?xhtml? or what do you think
is required?

If you could help me sir i would be verry thankfull, if you do have a website you
always could forward me with a link.

my email is lieven@wbs.co.za

thanks in advance
Nov 27 '06 #7

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

Similar topics

2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
0
by: root | last post by:
hi there, I've tried to install mysql-3.23.55.tar.gz but failed. Firstly, I've created directory /home/users/mysql and add group for mysql. Those are the command that I've used previously: ...
0
by: Richard Gabriel | last post by:
Hi everyone, Since we upgraded to MySQL 4.0.13 from 3.23, we have been getting table corruption often. It happens about twice per week (with about 500 queries per second average). I have even...
0
by: Ryan Schefke | last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ..I just sent this out to the win32 distribution list but no one has...
0
by: Mark Adams | last post by:
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start it as root from a terminal with...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
4
by: Mark | last post by:
the Following bit of code doesn't work. It seems to respond to the second, starting with 'add iif statement for Good Practice', but not to the first, starting 'add iif statement for archived' ...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
31
by: Extremest | last post by:
I have a loop that is set to run as long as the arraylist is > 0. at the beginning of this loop I grab the first object and then remove it. I then go into another loop that checks to see if there...
1
by: DarkGiank | last post by:
Hi, im new to csharp and im trying to create a class that can change the application database without no rewriting all connection code... but cause some reason it is not working... it tells me that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.