hi
ihad an array in php and iwant to insert its value in database
the coding is:
<?php
$nv_pairs = explode('&',$qu ery_string);
$array[50];
list ($name, $value) = explode ('=',$nv_pairs) ;
$i = 0;
foreach($nv_pai rs as $array[$i]) {
$array[$i]=
preg_replace('/\%0d%0a+/',"<br> &nb sp;
; &nb sp; &nb sp;
; &nb sp; &nb sp;
; &nb sp; &nb sp;
; &nb sp; &nb sp;
; &nb sp; &nb sp;
; ",$array[$i]);
$array[$i]= urldecode ($array[$i]);
$array[$i]= preg_replace('/\d*\=/', " ",$array[$i]);
$array[$i]= urldecode ($array[$i]);
$i++;
}
ksort($array);
while(list($key ,$value)=each($ array)) {
if (preg_match("/\d+/",$value)) {
echo "<br> &nb sp;
&nb sp; &nb sp;
&nb sp; &nb sp;
&nb sp; &nb sp;
&nb sp; &nb sp;
&nb sp; &nb sp;
&nb sp;<b>$value</b>";
}
else {
echo " <b>$value</b>";
}
}
?>
now how can $value be put in database or the ksort value of
array 1 1774 ga********@gmai l.com wrote: hi ihad an array in php and iwant to insert its value in database the coding is:
<?php $nv_pairs = explode('&',$qu ery_string); $array[50]; list ($name, $value) = explode ('=',$nv_pairs) ; $i = 0; foreach($nv_pai rs as $array[$i]) { $array[$i]= preg_replace('/\%0d%0a+/',"<br> &nb sp; ; &nb sp; &nb sp; ; &nb sp; &nb sp; ; &nb sp; &nb sp; ; &nb sp; &nb sp; ; &nb sp; &nb sp; ; ",$array[$i]); $array[$i]= urldecode ($array[$i]); $array[$i]= preg_replace('/\d*\=/', " ",$array[$i]); $array[$i]= urldecode ($array[$i]); $i++; } ksort($array); while(list($key ,$value)=each($ array)) { if (preg_match("/\d+/",$value)) { echo "<br> &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp; &nb sp;<b>$value</b>"; } else { echo " <b>$value</b>"; } } ?>
now how can $value be put in database or the ksort value of array
Which database? Do you want to put the array all in one row, or
multiple rows?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike S. Nowostawsky |
last post by:
I tried using the "toUpperCase()" property to change the value of an array
entity to uppercase BUT it tells me that the property is invalid. It seems
that an array is not considered an object when it is assigned a text
literal?? HOW can I change the array value to upper case then? What other
method exists for arrays?
Ex:
var GridArrayName1 = new Array();
GridArrayName1 = new Array ('test-value');
GridArrayName1 = GridArrayName1...
|
by: Fabio Negri Cicotti [MCP] |
last post by:
Hi All.
I'm trying to insert data into 2 tables (parent-child) using the ADO.NET's
SetParentRow method. The parent table has an identity column as primary key.
When I execute the code below I get the following message: "Cannot insert
the value NULL into column 'hdtID', table
'myinstance.mydb.Hotel_Details_Lang'; column does not allow nulls. INSERT
fails." Any idea?
PS: To create the DataAdapters, I'm using SqlCommandBuilder.
|
by: hellyna |
last post by:
How to insert radiobutton value into the mysql?
This is addrecordfrom.php
<form name="addsummonrecord" method="post" action="addrecordprocess.php" id="signup" onSubmit="return checkform(this);">
<table width="452" border="1" align="right" cellpadding="4" cellspacing="3" bordercolor="#003093" id="table">
<tr>
<td width="210" class="labelfield">Record Code:</td>
<td width="211" nowrap class="field">
|
by: nicolas.bouchard |
last post by:
I am developing an integration process between two databases. One of
them is a SQL Server 2000 and the other is using MSDE 2000. The
integration process is done in C# (VS2003).
The main database is the SQL Server, the MSDE will contain a really
small subset of the data found on the main. To help diminish the amount
of time taken to develop an integration process between those
databases, the same structure are found on both side. The only...
|
by: Mukesh |
last post by:
sir,
i am developing a database, which will store the users profile
both personal and professional
which includes the address, telephone, gender and etc.
in my main table i have created a column of xml data type. i was
successful in inserting the static
value inside my table.by following code:---
UPDATE docs
| |
by: IRC |
last post by:
hey, i am pretty new on javascript as well as PHP,
Hey, anyone can you help me, how to pass the javascript array value to
php page.........
i want to retrieve the values which are arrayed on "selectedValues"
from next page for php variable
this is my javascript code saved on "sendValue.js" file,
<script>
function updateRecordEntry(requestValue){
|
by: abhishek1234321 |
last post by:
mysql_query("CREATE TABLE $value (Subject VARCHAR(200), External int(3))");
preg_match_all('/<i>(.*?)<\/i>/si', $matches, $submatch, PREG_SET_ORDER);
mysql_query("INSERT INTO $value (Subject) VALUES ('$submatch')");
its only a part of the code
$matches contains html data with tags
i'm matching the data between the <i> and </i> tags
and i guess its been stored in $submatch array
now i want to knw a way through which i can insert...
|
by: Octo Siburian |
last post by:
I have been collecting data from ms.access database into a class object
'_Get and put in data from database Fingerprint(RAS) into CPresensiFingerprint
Public Function GetdbFingerprint() As CPresensiFingerprint
Dim presensiFinger As New CPresensiFingerprint
Dim SQLSelectdbRAS As String
Dim rsFinger As Recordset
Dim dateNow_ As Date
dateNow_ = um_TgldanJamSkrg()
|
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: 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: 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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |