PHP - Sending Variable Using Curl When Echoed Shows Extra Slash
when I send a post variable to another page for processing using cURL and then I echo the variable I am getting extra slashes and periods
this is where I set the fields to send. Code: [Select] curl_setopt($ch, CURLOPT_POSTFIELDS,"name='. $name .'&email='. $email .'&serial='. $serialnumber .'"); this is what happens when I echo $serial on the processing page. Code: [Select] \'. SLNM7IV6ZM98YJRXO8D5 .\' it should look like Code: [Select] SLNM7IV6ZM98YJRXO8D5 Similar TutorialsOk, here's what I'm trying to do. In Zend, you can modify a template title for a page within the actual template file even though the title has already been set. So, say I have this in a common header file: Code: [Select] <?php echo $title; ?> ..but I then want to maybe change that within my main template page, say my 'about' page. How would I go about that? Currently I do this: include($commonheader); include($content); include($footer); It's in the content where I want to be able to change the title in the header, should I need to. You can do this with Zend but it's beyond me how they do it. Should note, the above is for simplicity sake. I am doing this using OOP methods. Any help appreciated. Maybe ob_flush? I am trying to create a page for customers to enter their details. I am using a html form.
When the submit button is pressed the form posts the inputs to the same page, which then checks if the inputs are empty. If they are not then each post variable is allocated a session variable so this info can be accessed late on in the system.
If some of the inputs are empty then the value of the input forms become equal to the session variables that they were just allocated to so that the customer doesn’t have to retype their information.
This is where the problem occurs. When I load the page each input box has a slash inside it and when the submit button is pressed a mother slash is added.
My code is below:
<?php session_start(); if(isset($_POST['NextPage'])){ if (!empty($_POST['CName'])){ $_SESSION["CName"] = $_POST['CName']; if (!empty($_POST['CStreet'])){ $_SESSION["CStreet"] = $_POST['CStreet']; if (!empty($_POST['CTown'])){ $_SESSION["CTown"] = $_POST['CTown']; if ($_POST['Counties'] != "-"){ $_SESSION["CCounty"] = $_POST['Counties']; if (!empty($_POST['CPostcode'])){ $_SESSION["CPostcode"] = $_POST['CPostcode']; if (!empty($_POST['CEmail'])){ $_SESSION["CEmail"] = $_POST['CEmail']; if (!empty($_POST['CNumb'])){ $_SESSION["CNumb"] = $_POST['CNumb']; $NotEmpty = true; }else{ $ErrorMsg = "Number is empty. </br>"; } }else{ $ErrorMsg = "Email is empty. </br>"; } }else{ $ErrorMsg = "Postcode is empty. </br>"; } }else{ $ErrorMsg = "County is empty. </br>"; } }else{ $ErrorMsg = "Town is empty. </br>"; } }else{ $ErrorMsg = "Street is empty. </br>"; } }else{ $ErrorMsg = "Name is empty. </br>"; } } $content = ' <h3 id="CTitle"> Customer Details </h3> <p><i>'.$ErrorMsg.'</i></p> <form action=" " method="POST" name="CDetails" id="CDetails"> Name: * <input type="text" name="CName" size="30" value='.$_SESSION["CName"].'/></br> First line of your address: * <input type="text" name="CStreet" size="40" value='.$_SESSION["CStreet”];.’/></br> Town: * <input type="text" name="CTown" size="25" value='.$_SESSION["CTown"].'/></br> Postcode: * <input type="text" name="CPostcode" size="11" value=‘.$_SESSION["CPostcode"].'/></br> Email address: * <input type="text" name="CEmail" size ="35" value='.$_SESSION["CEmail”];.’/></br> Phone Number: * <input type="text" name="CNumb" value='.$_SESSION["CNumb"].'/></br> <input type="submit" name="NextPage" value="Next" id="Next”/> </form> ?> I'm trying to make this code send some simple XML to another URL using cURL but it keeps giving me "Bad Request (Invalid Number)". Can anyone see anything obviously wrong with this code that might cause this error? Personally (and I am a newbie), I don't see any line in the code where the actual XML (i.e. $xml) is sent to other URL. Could that be the problem? If I'm simply missing it, can someone explain to me where this code takes the $xml variable and sends it to the other URL. It just seems to me like the $xml variable is given some data and then nothing is done with that variable. Anyone? Code: [Select] <?php $companyKey = '310846'; $server = 'http://67.202.202.153'; $xml = '<?xml version="1.0" encoding="utf-8"?>' . '<LeadImportDatagram>'. '<CompanyKey>' . $companyKey . '</CompanyKey>' . '<NotificationEmailTo>joeschmoe@gmail.com</NotificationEmailTo>' . '<LeadInfo>'; '<City>Osweeego</City>'; '</LeadInfo>'; '</LeadImportDatagram>'; if(substr($server, 0, 4) != 'http') $server = 'http://' . $server; if(substr($server, -1) == '/') $server = rtrim($server, '/'); $curlConfig = array( CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true ); $curl = curl_init($server . '/xml/importlead.asp'); curl_setopt_array($curl, $curlConfig); $responseText = curl_exec($curl); $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); if($httpCode !== 200) { echo 'Error sending XML: ' . $responseText; exit(0); } header('Location: thanks.php'); exit(0); ?> I've looked at various cURL tutorials and the PHP manual, but I don't see what I'm doing wrong here. My goal is to be able to send data to test.php and then have that page run a MySQL query to insert the TITLE and MESSAGE into the database. Any comments? :/ post.php <?php if(isset($_GET['title']) && isset($_GET['message']) && isset($_GET['times'])) { $array = array('title' => urlencode($_GET['title']), 'message' => urlencode($_GET['message'])); foreach($array as $key => $value) { $fields = $key.'='. $value .'&'; } rtrims($felds); //set our init handle $curl_init = curl_init(); //set our URL curl_setopt($curl_init, CURLOPT_URL, 'some url'); //set the number of fields we're sending curl_setopt($curl_init ,CURLOPT_POST, count($array)); for($i = 0; $i < $_GET['times']; $i++) { //send the POST data curl_setopt($curl_init, CURLOPT_POSTFIELDS, $fields); curl_exec($curl_init); echo 'post #'.$i. ' sent<br/>'; } //complete echo '<b>COMPLETE</b>'; //close session curl_close($curl_init); } else { ?> <form action="post.php" method="GET"> <table> <tr><td>Title</td><td><input type="text" name="title" maxlength="30"></td></tr> <tr><td>Content</td><td><textarea name="message" rows="20" cols="45" maxlength="2000"></textarea></td></tr> <tr><td>Process Amount</td><td><input type="text" name="times" size="5" maxlength="3"></td></tr> <tr><td>START</td><td><input type="submit" value="Initiate Posting"></td></tr> </table> </form> <?php } ?> test.php <?php mysql_connect('host', 'user', 'pass'); mysql_select_db('somedb'); if($_POST['title'] && $_POST['message']) { mysql_insert("INSERT INTO tests VALUES (null, '{$_POST['title']}', '{$_POST['message']}')"); } echo '<hr><br/>'; //query $query = mysql_query("SELECT * FROM tests ORDER BY id DESC"); while($row = mysql_fetch_assoc($query)) { echo $row['id'].'TITLE: '. $row['title'] .'<br/>MESSAGE: '. $row['message'] .'<br/><br/>'; } ?> The var_dump of the $cart_items array is supposed to show an array of $cart_items with the quantities added together for the same id but it doesn't even show an array, it just shows one value. session_start(); $cart_items = $_SESSION["cart_items"]; if ( $cart_items == null ) { $cart_items = array(); } if ( isset($_REQUEST["element_id"]) ) { $id = $_REQUEST["element_id"]; } if ( isset($_REQUEST["quantity"]) ) { $quantity = $_REQUEST["quantity"]; } if ( isset($id) && isset($quantity) ) { if (isset($cart_items[$id])) { $cart_items[$id] += $quantity; } else { $cart_items[$id] = $quantity; } } var_dump($cart_items);
Hey guys! I have the following doubt, I have a Date value and I want to add to that date 30 seconds plus. Example: Code: [Select] $last_time = date('D M j H:i:s \G\M\TO Y'); //echo: Thu Mar 10 18:33:48 GMT-0300 2011 I need the following date: Thu Mar 10 18:33:48 GMT-0300 2011 to become: Thu Mar 10 18:34:18 GMT-0300 2011 This means that the retrieved Date now has 30 more seconds... Any ideas?? Looking forward to any help, Thanks a lot in advance, Cheers! Hi I can get this to work can you point me in the right direction curl_setopt( $ch, CURLOPT_URL, "http://website.com/action=%22getcontent%22%20shipid=%22\"$content\"%22%20/%3E%3C/request%3E"); I want to include the variable $content in the url thanks hi guys I just could not find the answer on forum. I have a url like this http://www.example.com/deal.php?id=367 and my question is : how can i use curl function to get the html and the id value which is 367 thanks Hi all I am in the process of creating a product page where the user can type in three initials into a form and then 'clicks add to basket'. The button doesn't use a form just a url: basket.php?action=add&id=1&qty=1 This adds the item into a basket using sessions rather than a database. The question is, how do I add three variables into my form so that they are sent via the URL and into the session? Wil I have to start again with a form? Here's the code: <td class="table-font-grey">Why not make your whip extra special by adding up to three elegantly engraved Kunstler script initials.</td> <td width="42" style="border: 1px solid grey;"><input name="initial_1" type="text" size="8" maxlength="1" height="40px" /></td> <td width="43" style="border: 1px solid grey;"><input name="initial_2" type="text" size="8" maxlength="1" height="40px" /></td> <td width="43" style="border: 1px solid grey;"><input name="initial_3" type="text" size="8" maxlength="1" height="40px" /></td> </tr> <tr> <td height="15"> </td> <td width="328" class="table-font"> </td> <td width="42" align="center" class="table-font">1</td> <td width="43" align="center" class="table-font">2</td> <td align="center" class="table-font">3</td> </tr> <tr> <td> </td> <td colspan="3" class="table-font"> </td> <td align="right" class="table-font"> </td> </tr> </table> <hr /> <p> </p> <table width="494" border="0"> <tr class="table-font"> <td width="263" height="24"> <a href="<?php echo "basket.php?action=add&id=1&qty=1" ?>" title="Add <?php echo $product['name'] ?> to Cart"> <a href="<?php echo WEB_URL."basket.php?action=add&id=1&qty=1" ?>" title="Add <?php echo $product['name'] ?> to Cart"> <img src="<?php echo WEB_URL."images/product-add-button.gif" ?>" alt="Buy <?php echo $product['name'] ?>" /></a> Many thanks Pete Hi all I am in the process of creating a product page where the user can type in three initials into a form and then 'clicks add to basket'. The button doesn't use a form just a url: basket.php?action=add&id=1&qty=1 This adds the item into a basket using sessions rather than a database. The question is, how do I add three variables into my form so that they are sent via the URL and into the session? Wil I have to start again with a form? Here's the code: <td class="table-font-grey">Why not make your whip extra special by adding up to three elegantly engraved Kunstler script initials.</td> <td width="42" style="border: 1px solid grey;"><input name="initial_1" type="text" size="8" maxlength="1" height="40px" /></td> <td width="43" style="border: 1px solid grey;"><input name="initial_2" type="text" size="8" maxlength="1" height="40px" /></td> <td width="43" style="border: 1px solid grey;"><input name="initial_3" type="text" size="8" maxlength="1" height="40px" /></td> </tr> <tr> <td height="15"> </td> <td width="328" class="table-font"> </td> <td width="42" align="center" class="table-font">1</td> <td width="43" align="center" class="table-font">2</td> <td align="center" class="table-font">3</td> </tr> <tr> <td> </td> <td colspan="3" class="table-font"> </td> <td align="right" class="table-font"> </td> </tr> </table> <hr /> <p> </p> <table width="494" border="0"> <tr class="table-font"> <td width="263" height="24"> <a href="<?php echo "basket.php?action=add&id=1&qty=1" ?>" title="Add <?php echo $product['name'] ?> to Cart"> <a href="<?php echo WEB_URL."basket.php?action=add&id=1&qty=1" ?>" title="Add <?php echo $product['name'] ?> to Cart"> <img src="<?php echo WEB_URL."images/product-add-button.gif" ?>" alt="Buy <?php echo $product['name'] ?>" /></a> Many thanks Pete Hi dear community i want to run a Curl to get the contents of a remote web page into a PHP variable <?php // // The PHP curl module supports the received page to be returned in a variable // if told. // $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://www.myurl.com/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $result=curl_exec ($ch); curl_close ($ch); ?> I declare this variable:($ch) Well - can i work with this variable - eg. to parse this with a parser!? look forward to hear from you $result=curl_exec ($ch); gretings I'm a new PHP users needing some help. I've got two code snippets that run a CURL post to a syslog server grabbing specific records that I then parse with regex. Both are similar differing in the specific CURL URL and Regex. One works does not. The failing program seems to fail the regex parse creating a null array. What I've done thus far. Tested the regex on regex101 (works fine, using PCRE). Dumped and echoed the CURL created variable and then rechecked against regex101. ( again all good) Created a static variable in the code of the CURL return string (regex works fine). So the CURL is working, the variable string is working appearing as expected and the regex works. But the variable feels like's it null when passed directly from the CURL to the regex. No error logs, but this is where I'm stuck I don't know what to pick at next. Here's a version of the code. Appreciate any thoughts. <?php
$str = curl_exec($ch); // curl steps ends
//$str = '_bkt _cd _indextime _kv _raw _serial _si _sourcetype _time dhcp_type host index linecount source sourcetype splunk_server Configuration initialization for /opt/splunk/etc took 17ms when dispatching a search (search ID: 1591198882.902292) Your search was restricted by ( ( index=nat OR index=network OR index=radius ) OR ( source=/data/syslog/security/ipblocker ) ) base lispy: [ AND 66 82 8a 9c dhcpack e4 f8 sourcetype::infoblox:dhcp [ OR index::nat index::network index::radius source::/data/syslog/security/ipblocker ] ] search context: user="testuser", app="search", bs-pathname="/opt/splunk/etc" Your timerange was substituted based on your search string network~978~07708B5A-37B1-4315-8EFA-70B96D12856C 978:118251396 1591198398 1 Jun 3 11:33:15 128.230.100.36 dhcpd[21353]: DHCPACK on 10.1.0.19 to e4:f8:9c:82:66:8a (ITS-NDD-BOA-T01) via bond0 relay bond0 lease-duration 7200 0 its-splunk-idx2.syr.edu network infoblox:dhcp 2020-06-03 11:33:15.000 EDT DHCPACK 128.230.100.36 network 1 /data/syslog/network/dhcp infoblox:dhcp its-splunk-idx2.syr.edu'; I have this simple while loop which retrieves data from a mysql query and displays several links on my homepage. I would like to avoid using the php get function and add query strings to my urls I am thinking of using session variables but I need help and I'm pretty sure this can't be done. When a visitor clicks a link from the several ones displayed by the while loop, that particular variable would be set in a session. In my code, the session will always send the last var Can this be done? Code: [Select] <? session_start(); // Start Session Variables $result = mysql_query("my query"); while($slice = mysql_fetch_assoc($result)){ $url = $slice['url']; $name = $slice['name']; ?> <a href="<? echo $url; ?>"><? echo $name; ?></a> <? } $_SESSION['name'] = $name; // Store session data ?> So I'm kind of new to PHP, and have been having lots of success, but I have no idea why this is occuring. It's probably a super easy answer...
I have a form that has checkboxes. Essentially I am echoing out the results of which ever checkboxes the user checks. Here's my code...
if(!empty($_POST[$i])){ foreach($_POST[$i] as $check){ $answer .= $check; } echo $answer;And the result that is echoed out says this.. ArraySF6Nitrogen (SF6 is one of the checkboxes that was selected, and Nitrogen is the other checkbox that was selected) I would be incredibly happy if the echoed out result just said SF6Nitrogen My question is why does it say "Array" first? Edited by trevzilla, 05 November 2014 - 01:26 PM. I echoed the query once and it came up as UPDATE `fields` SET `enabled` = 'True' WHERE `ID` = ''good Not sure why. Code: [Select] <?php // Include the database page include ('../inc/dbconfig.php'); $styleID = $_GET['id']; $query = "SELECT fields.ID, fields.fullName, fields.enabled FROM fields INNER JOIN styles ON styles.ID = fields.styleID WHERE styles.ID = '" . $styleID . "'"; $result = mysqli_query ( $dbc, $query ); // Run The Query ?> <script> $(document).ready(function() { $('div.message-error').hide(); $('div.message-success').hide(); $("#bioConfigForm").submit(function() { $('div.message-error').hide(); var data = $(this).serialize() + "&submitBioFields=True"; $.ajax({ type: "POST", url: "processes/bioconfig.php", data: data, success: function() { $('div.message-error').hide(); $("div.message-success").html("<h6>Operation successful</h6><p>Bio fields saved successfully.</p>"); $("div.message-success").show().delay(10000).hide("slow", function() { $('#content').load('mods/bioconfiguration.php'); }); } }); return false; }); }); </script> <!-- Title --> <div id="title" class="b2"> <h2>Bio Configuration</h2> <!-- TitleActions --> <div id="titleActions"> <!-- ListSearch --> <div class="listSearch actionBlock"> <div class="search"> <label for="search">Recherche</label> <input type="text" name="search" id="search" class="text" /> </div> <div class="submit"> <button type="submit" id="search-button" class="button"><strong><img src="img/icons/search_48.png" alt="comments" class="icon "/></strong></button> </div> </div> <!-- /ListSearch --> </div> <!-- /TitleActions --> </div> <!-- Title --> <!-- Inner Content --> <div id="innerContent"> <!-- Form --> <form action="#" id="bioConfigForm" > <fieldset> <legend>Bio Config</legend> <?php while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) { ?> <div class="field"> <label for="<?php '' . $row['ID'] . '' ?>"><?php echo '' . $row['fullName'] . ''?></label> <input type="radio" value="0" name="<?php echo $row['ID']; ?>" class="status" <?php if($row['enabled'] == 0) echo ' checked="checked"'; ?> />Enabled <input type="radio" value="1" name="<?php echo $row['ID']; ?>" class="status" <?php if($row['enabled'] == 1) echo ' checked="checked"'; ?> />Disabled </div> <?php } ?> <input type="submit" class="submit" name="submitBioFields" id="SubmitBioFields" title="Submit Bio Fields" value="Submit Bio Fields"/> </fieldset> </form> <!-- /Form --> Code: [Select] <?php // Include the database page require ('../inc/dbconfig.php'); if (isset($_POST['submitBioFields'])) { foreach($_POST as $bioFieldID => $value) { $query = "UPDATE `fields` SET `enabled` = '".$value."' WHERE `ID` = '".$biofieldID."'"; } mysqli_query($dbc,$query); $result = "good"; } else { $result = "bad"; } //Output the result echo $result; ?> Hey there I've adapted the search code from the tutorial on this site here http://www.phpfreaks.com/tutorial/simple-sql-search for a project I've been working on but have an error. The search works just fine but if either of the messages I've included are tripped (zero search characters or nothing found) then I get a blank screen and the error message is not echoed. (The vanilla code works fine - the error has arisen through the changes I needed to make). I don't know why this is happening and would appreciate some help please. Thanks in advance for any help. Code: [Select] session_start(); // check session variable if (isset($_SESSION['first_name'])) { include ('includes/header_loggedin.html'); //db connection info deleted $error = array(); //get search term, strip it if (isset($_GET['search'])) { $searchTerms = trim($_GET['search']); $searchTerms = strip_tags($searchTerms); // remove any html/javascript. if (strlen($searchTerms) < 1) { $error[] = 'Search terms must be longer than 1 character.'; }else { $searchTermDB = mysql_real_escape_string($searchTerms); // prevent sql injection. } //formulate query if (count($error) < 1) { $query = "SELECT * FROM table WHERE row LIKE '%{$searchTermDB}%'"; //make the query $result = mysql_query($query) or die(mysql_error()); //display the results if (mysql_num_rows($result) < 1) { $error[] = "Your search term yielded no results."; } else { while ($endresult = mysql_fetch_array($result)) { echo '<br />'; echo 'This is what we found'; echo '<br />'; echo '<a href="newpage.php?w=' . $endresult['row'] . '">' . $endresult['row'] . '</a>'; } } } } } Hey there guys, small problem here that I can't seem to figure out. I am in the process of programming a database with user-access control. I have the log-in system working great, but the logout link, which is located next to the logged-in username seems to not be echoing correctly. It is loading the 'Logout' text in text-form only, not link-form.... Any ideas on what may be causing this small glitch?? Thanks!! I have attached relevant code for said part for reference. <img src="images/username.png" height="20" width="20"> <b>Welcome</b> <?php echo ("<font color=#9e0219>$username</font>");?>, <?php echo '<a href="logout.php">Logout</a>';?> Ok I am not sure if this is possible but I hope someone out there can show me a way. I have a webpage with left content boxes that are looped in depending on the sql info. In one of the boxes the content of the box is going to be another page being pulled in. Now normally I would just put in the include ("page"); but its inside of an echo so you would end the echo do the include and then start the echo back up, however in this case its pulling in the coding from a variable so im a bit lost as to what to do now. The page would have something like... Code: [Select] echo ' '.html_entity_decode(stripslashes($info[content])).' '; and the info content part is Code: [Select] include("pages/paypalbox.php") I've tried making the variable Code: [Select] '; include("pages/paypalbox.php"); echo' Hoping that would fix it but I should of known better, the variable is being pulled in so its not processing it as part of the first step coding and it isn't going to do anything other then print it out like text. So is there a way to make this work? Thanks. So I filled out my edit form and I had it echo the query and it said exactly what it was supposed to but it didn't update it. Here's what the echo query looked like. UPDATE `efed_list_menu_items` SET `content_id`='0', `newscat`='0', `application_id`='1', `itemname`='Testing 3', `itemurl`='testing3.php', `sortorder`='3' WHERE `id` = '3' Hi there im having trouble with my code and was hoping someone may be able to help me? I think the trouble i am having is because i am echoing the form elements (form, hidden) and the value in those elements. This part is fine i think: Code: [Select] $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")){ $insertSQL = sprintf("INSERT INTO ships (ShipName, FleetID, PlayerName, Image1, Image2, Credits, HealthA, HealthB, MaxHealthA, MaxHealthB, Class, Hyperspace, PlanetID, Building, Maintenance) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['shipname1'], "text"), GetSQLValueString($_POST['fleetid1'], "int"), GetSQLValueString($_POST['playername1'], "text"), GetSQLValueString($_POST['image11'], "text"), GetSQLValueString($_POST['image21'], "text"), GetSQLValueString($_POST['credits1'], "int"), GetSQLValueString($_POST['healtha1'], "int"), GetSQLValueString($_POST['healthb1'], "int"), GetSQLValueString($_POST['maxhealtha1'], "int"), GetSQLValueString($_POST['maxhealthb1'], "int"), GetSQLValueString($_POST['class1'], "int"), GetSQLValueString($_POST['hyperspace1'], "int"), GetSQLValueString($_POST['planetid1'], "int"), GetSQLValueString($_POST['building1'], "int"), GetSQLValueString($_POST['maintenance1'], "int")); mysql_select_db($database_swb, $swb); $Result1 = mysql_query($insertSQL, $swb) or die(mysql_error()); $insertGoTo = "planet.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } The problem may lay he Code: [Select] <?php echo'<form id="form1" name="form1" method="post" action="">';echo'<table width="400" border="0" align="top">'; do { echo '<tr> <td width="200" align="center">'; echo '<span class="arial12">'; echo "<img src=".$row_Ships["Image1"]." height =\"250\" width=\"400\">"; echo'| Maintenance: '; echo $row_Ships['Maintenance'];echo ' | '; echo'<input type="submit" name="Submit" value="Build" />'; echo' | Construction Time: '; echo $row_Ships['Building']; echo' | ';echo '</td></tr>'; echo" <input name='fleetid1' type='hidden' id='fleetid1' value='".$totalRows_Fleet." + '1''/>"; echo" <input name='fleetname1' type='hidden' id='fleetname1' value='Fleet ".$totalRows_Fleet." + '1''/>"; echo" <input name='shipname1' type='hidden' id='shipname1' value='".$row_Ships['ShipName']."'/>"; echo" <input name='playername1' type='hidden' id='playername1' value='".$_SESSION['MM_Username']."'/>"; echo" <input name='credits1' type='hidden' id='credits1' value='".$row_Ships['Credits']."'/>"; echo" <input name='image11' type='hidden' id='image11' value='".$row_Ships['Image1']."'/>"; echo" <input name='image21' type='hidden' id='image21' value='".$row_Ships['Image2']."'/>"; echo" <input name='healtha1' type='hidden' id='healtha1' value='".$row_Ships['HealthA']."'/>"; echo" <input name='healthb1' type='hidden' id='healthb1' value='".$row_Ships['HealthB']."'/>"; echo" <input name='maxhealtha1' type='hidden' id='maxhealtha1' value='".$row_Ships['MaxHealthA']."'/>"; echo" <input name='maxhealthb1' type='hidden' id='maxhealthb1' value='".$row_Ships['MaxHealthB']."'/>"; echo" <input name='class1' type='hidden' id='class1' value='".$row_Ships['Class']."'/>"; echo" <input name='hyperspace1' type='hidden' id='hyperspace1' value='".$row_Ships['Hyperspace']."'/>"; echo" <input name='maintenance1' type='hidden' id='maintenance1' value='".$row_Ships['Maintenance']."'/>"; echo" <input name='Planetid1' type='hidden' id='planetid1' value='".$row_Credits['PlanetID']."'/>"; echo" <input name='building1' type='hidden' id='building1' value='".$row_Ships['Building']."'/>"; } while ($row_Ships = mysql_fetch_assoc($Ships)); echo '</table></form>';?> No records are insterted at all?? The page redirection after insert is not happening either. If anybody coould help that would be brilliant... Thank You |