PHP - I Keep Getting Error While The Php Code Tries To Read The Post Array I Think
Hello together, I'm still relatively new with PHP and I'm encountering an error with the error code (Warning: Undefined array key "title" in I:\xampp\htdocs\test\Datenspeichern.php on line 13 to 17.). Normally I wanted that when I enter the data in the fields from the CD_Website page, that it is inserted in my created database and displayed in the table on the page. Does anyone know where my error is? Thanks a lot
main Code= <!doctype html> <html> <head> <meta charset="utf-8"> <title>Unbenanntes Dokument</title> <style type="text/css"> table { border-collaps: collapse; width: 100%; font-family: serif; font-size: 35px; text-align: center; } td { font-size: 25px; text-align: center; font-family: serif; } </style> </head> <body> <table> <tr> <th>CD-Titel</th> <th>Artist</th> <th>Songtitel</th> <th>Musiklänge</th> <th>Lied Nummer</th> </tr> <?php $host = "localhost"; $user = "root"; $password = ""; $db_name = "cdaufgabe"; $con = mysqli_connect($host, $user, $password, $db_name); if(mysqli_connect_error()) { die("Verbindungsabbruch mit der Datenbank: ". mysqli_connect_error()); }; $check = "SELECT * FROM `cd-titel`"; $result = mysqli_query($con, $check); if ($result > null) { while ($row = $result->fetch_assoc()){ echo "<tr><td>" . $row['CD-Titel'] . "</td> <td>" . $row['Artist'] . "</td> <td>" . $row['Songtitel'] . "</td> <td>" . $row['Musiklänge'] . "</td> <td>" . $row['Lied-Nummer'] . "</td></tr>"; }; }; /*if (isset($_POST['submitted'])) { $titel = $_POST['titel']; $artist = $_POST['artist']; $songtitel = $_POST['songtitel']; $musicle = $_POST['musicle']; $liednr = $_POST['liednr']; $data_add = "INSERT INTO cd-titel (CD-Titel, Artist, Songtitel, Musiklänge, Lied-Nummer) VALUES ('$titel', '$artist', '$songtitel', '$musicle', '$liednr')"; if (!mysqli_query($db_name, $data_add)) { die('Fehler beim einfügen von Daten'); } } */ // $data_add = "INSERT INTO `cd-titel` (`CD-Titel`, `Artist`, `Songtitel`, `Musiklänge`, `Lied-Nummer`) VALUES ('$titel', '$artist', '$songtitel', '$musicle', '$liednr')"; // mysqli_query($con, $data_add); /*mysqli_query($con, $data_add);*/ ?> <form methode="post" action="Datenspeichern.php"> <input type="text" name="titel" placeholder="CD-Titel"/> <input type="text" name="artist" placeholder="Artist"/> <input type="text" name="songtitel" placeholder="Songtitel"/> <input type="text" name="musicle" placeholder="Musiklänge"/> <input type="text" name="liednr" placeholder="Lied-Nummer"/> <input type="submit" name="submitted" value="speichern"/> </form> </br></br></br> </table> </body> </html> second code(Datenspeichern.php)= <?php $con = mysqli_connect('localhost', 'root', ''); if (!$con) { echo'Nicht verfügbar'; } if (!mysqli_select_db($con, 'cdaufgabe')){ echo 'Datenbank nicht ausgewählt'; }; $titel = $_POST['titel']; $artist = $_POST['artist']; $songtitel = $_POST['songtitel']; $musicle = $_POST['musicle']; $liednr = $_POST['liednr']; $data_add = "INSERT INTO cd-titel (CD-Titel, Artist, Songtitel, Musiklänge, Lied-Nummer) VALUES ('$titel', '$artist', '$songtitel', '$musicle', '$liednr')"; if (!mysqli_query($con, $data_add)){ echo 'Fehler'; } else { echo'Eingefügt'; }; header("url=CD_Webseite.php"); ?> Does anyone knows the mistake i keep doing? Similar Tutorialshi there, seems like I'm getting a fairly common beginners php error but as I'm using a number of differant files and as I'm not entirley clear on a couple of things I thought I'd tap into the immense php talent on this site here's the error - Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\Epointment\index.php:4) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\Epointment\ot\views\header.php on line 38 I have an index page that allows a user to log on, the processing go's away and checks the usual stuff then reloads the login page with the user detail or just reloads the login page with the user/password fields blank. This seemed to be working ok until I put my files onto another web server that had output_buffering turned off. here's part of the login page Code: [Select] <html> <head><title></title></head> <body> <?php ini_set("display_errors", "1"); error_reporting(-1); $dir = dirname(__FILE__); require_once "$dir/ot/ot.php"; ot::include_view('header', array('account' => null)) ?> // various stuff <p>Please login below</p> <?php ot::include_view('login_form')?> the ot.php file doesn't have any echo's or print_r's etc if that helps?? here's the header.php file.. <?php Code: [Select] if (ot::get('do_logout', 0) == 1) { ot::destroy_session(); header("Location: http://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}"); exit; } elseif (self::post('do_reset_password')) { ot::do_reset_password($err); echo "$err"; } $adb = ot::db('account'); $account = null; $error = ""; $id = ot::account_id(); if ($id) { $account = ot::account_from('id', $id); $res = ot::do_change_password($account, $err); if ($res) { echo "<p>Password Changed Successfully</p>"; $account = $res; } else if ($err) { echo "<p>Error: $err</p>"; } $res = ot::do_change_email($account, $err); if ($res) { echo "<p>Email Changed Successfully</p>"; $account = $res; } else if ($err) { echo "<p>Error: $res</p>"; } } else { $account = ot::do_login(); if ($account) { header("Location: http://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}"); exit; } } ?> here's the ot::do_login function Code: [Select] public static function do_login(&$err="") { $adb = ot::db('account'); $e = self::post('email'); $p = self::post('pwd', '', false); if (self::post('do_login') && $e && $p) { $ao = self::account_from('email', $e); if ($ao) { if (self::validate_login($e, $p, $ao)) { //echo "\n"."hit2"; $_SESSION['id'] = $ao->id; return $ao; } } $err = "Invalid email or password"; return false; } } and here's the login_form.php, which is called from ot::do_login from header.php ... Code: [Select] <form action='<?php echo $_SERVER['REQUEST_URI']?>' method='post' > <p>Email:<br/><input type='text' name='email' /></p> <p>Password:<br/><input type='password' name='pwd' /></p> <p><input type='submit' name='do_login' value='Login' /> <input type='submit' name='do_reset_password' value='Reset Password' /></p> </form> Any pointers or useful things I've not posted? is this bit of code from above ok? as in I'm doing some php stuff before the header() function gets used? Code: [Select] <html> <head><title></title></head> <body> <?php ini_set("display_errors", "1"); error_reporting(-1); $dir = dirname(__FILE__); require_once "$dir/ot/ot.php"; ot::include_view('header', array('account' => null)) i created an array like this while{ $ir = 0; $stud[$row_mrk['id_sub']][$ir]=$row_mrk['id_sub']; $ir++; $stud[$row_mrk['id_sub']][$ir]=$row_mrk['seminar_topic']; $ir++; $stud[$row_mrk['id_sub']][$ir]=$row_mrk['seminar_mark']; $ir++; $stud[$row_mrk['id_sub']][$ir]=$row_mrk['attendance']; $ir++; $stud[$row_mrk['id_sub']][$ir]=$row_mrk['internal_mark']; $ir++; $stud[$row_mrk['id_sub']][$ir]=$row_mrk['external_mark']; $ir++; } echo "<input type='hidden' name='ar_std' id='ar_std' value='$stud' /> </table>" ; and it is able to print in the same page using foreach ($stud as $v1) { echo "$v1\n<br>"; foreach ($v1 as $v2) { echo "$v2\n<br>"; } } and in the next page $ar_stud[]=$_POST["ar_std"]; I'm getting an error PHP Warning: Invalid argument supplied for foreach() in save.php on line 25 PHP Stack trace: Trying to read through this query string to get a list of subjects (sub) and products (pro) sub2=pro73&sub2=pro76&sub2=pro79&sub2=pro90&sub2=pro92&sub3=pro73&sub3=pro74&sub3=pro87&sub3=pro90 so i need 2 -73, 2-76, 2-79, 3-73, 3-74 etc. What am i missing in this code. foreach($_POST as $key => $val) { $sub = substr($key, 3); $pro = substr($val, 3); // $links = "SELECT * FROM table WHERE sub='".$sub."' AND pro='".$pro."';"; }
Hi, I am fairly new to PHP and I have built a page which accepts values from dynamically added rows so there is a combination of HTML,Javascript and PHP in the process. I am caught up with a problem HTML section In my form I have a table with a column as below and a dynamic "Add Row" which would increment the row in javascript and assign a new value to the input name as txtRow2,txtRow3,txtRow4 and so on based on the number of iteration " <tr><td><input type="text" name="txtRow1" id="txtRow1" size="40" /></td></tr> <input type="button" value="Add Row" onclick="addRow();" />" Javascript section The below code generates the new row in js var cellRight2 = row.insertCell(1); var e1 = document.createElement('input'); e1.type = 'text'; e1.name = 'txtRow1' + iteration; e1.id = 'txtRow1' + iteration; e1.size = 20; cellRight1.appendChild(e1); I hope you have understood what I have done till above.. Now comes the problematic part PHP section( I love PHP ) I have to insert the column values into mysql and i will do this using a for loop within which I will have my insert statement INSERT INTO test values($txtRow) Lets say I added 4 rows dynamically with values held in $txtRow1,$txtRow2,$txtRow3,$txtRow4(See the java script section) how would I use these values in my PHP insert statement as I don't want to write 4 different insert scripts and the following "$txtRow.i" won't work for ($i = 1; $i <= 10; $i++) { INSERT INTO test values($txtRow.i) } Any suggestions are welcome...If you think you still need to see the whole code i can post it too. Jay How do forums check if you've read a post or not? Is it through cookies? Once upon a time needed help on March 12, 2008 this community helped me, I am still a learner tried to help back but all the problems posted here beyond my skills to solve them so I kept quiet. and Now I need help once again hope I will get it done. Its PHPPOS developed in Codeigniter This code below is from application\controllers\inventory_summary.php file Code: [Select] <?php require_once("report.php"); class Inventory_summary extends Report { function __construct() { parent::__construct(); } public function getDataColumns() { return array($this->lang->line('reports_item_name'), $this->lang->line('reports_item_number'), $this->lang->line('reports_description'), $this->lang->line('reports_count'), $this->lang->line('reports_reorder_level')); } public function getData(array $inputs) { $this->db->select('name, item_number, quantity, reorder_level, description'); $this->db->from('items'); $this->db->where('deleted', 0); $this->db->order_by('name'); return $this->db->get()->result_array(); } public function getSummaryData(array $inputs) { return array(); } } ?> And this partial code below is from application\controllers\report.php file Code: [Select] function inventory_summary($export_excel=0) { $this->load->model('reports/Inventory_summary'); $model = $this->Inventory_summary; $tabular_data = array(); $report_data = $model->getData(array()); foreach($report_data as $row) { $tabular_data[] = array($row['name'], $row['item_number'], $row['description'], $row['quantity'], $row['reorder_level']); } $data = array( "title" => $this->lang->line('reports_inventory_summary_report'), "subtitle" => '', "headers" => $model->getDataColumns(), "data" => $tabular_data, "summary_data" => $model->getSummaryData(array()), "export_excel" => $export_excel ); $this->load->view("reports/tabular",$data); } } ?> Together they get the job done as follow: Item Name Item Number Description Count Reorder Level (Count is quantity in stock) Item 1 0002 xyz 5 3 Item 2 0s00 xyz 5 3 Item 3 0005 xyz 5 3 Item 4 0006 xyz 5 3 The output I want need to be like this: Item Name Item Number Description cost price Count Reorder Level Item 1 0002 xyz 250 5 3 Item 2 0s00 xyz 120 5 3 Item 3 0005 xyz 300 5 3 Item 4 0006 xyz 500 5 3 Total Stock Value 5850 Total Count 20 <-- this doesn't require any formation just needs to be at bottom of all the queries like shown here. This is what I want mainly >>>>>>>>>> Total Stock Value (cost price * count foreach and then sum of all results ) and sum of all count cost price table and column is different than one used above in the code which is: databse table is ' receivings_items ' Column is 'item_cost_price' example php code to fetch is : Code: [Select] $sql = "SELECT `item_cost_price` FROM `receivings_items`"; config.php contains all the connection variables to MySQL Please Help me I'm trying to send some POST data to a page and then get the contents of it. The page is not on my server, so I can't use Sessions or GET. Google hasn't provided me with a definite answer. How would I do this? $post='{"cart_items":[{"configuration":{"price":100,"recharge_number":"9999999999"},"product_id":"999","qty":1}]}';i try this n reslut was :There are no valid items in cart: help me plz Edited by ShivaGupta, 30 November 2014 - 01:11 AM. I got a question im using izabi for me im one who loves the software. But there some quirks that they forgot to add when making the mail system. I was wondering how it would be possible to code in a peice of php where it says read after someone read the email. If you need a copy of the mail mail script let me know. <?php class Post{ private $user_obj; private $con; public function __construct($con, $user){ $this->con = $con; $this->user_obj = new User($con,$user); } public function submitPost($body,$user_to){ $body = strip_tags($body);////Removing HTML TAGS $body = mysqli_real_escape_string($this->con,$body); $check_empty = preg_replace('/\s+/', '', $body);//delte all spaces if($check_empty != ""){ //Current Date and time $date_added = date("Y-m-d H:i:s"); //get username $added_by = $this->user_obj->getUsername(); //if user have not a profile send to the none if($user_to == $added_by){ $user_to = "none"; } ////insert query $query = mysqli_query($this->con,"INSERT INTO posts VALUES('','$body','$added_by','$user_to','$date_added','no','no','0')"); $retured_id = mysqli_insert_id($this->con); //insert notification //Update post count for user $num_post = $this->user_obj->getNumPosts(); $num_post++; $update_query = mysqli_query($this->con,"UPDATE users SET num_post = '$num_post' WHERE username = '$added_by'" ); } public function loadPostsFriends(){ $str = ""; //string to return $data = mysqli_query($this->con,"SELECT * FROM posts where deleted = 'no' ORDER by id DESC"); while($row = mysqli_fetch_array($data)) { $id = $row['id']; $body = $row['body']; $added_by = $row['added_by']; $date_time = $row['date_added']; /// Creating user post on other user profile if($row['user_to'] == "none"){ user_to = ""; else { $user_to_obj = new User($con,$row['user_to']); $user_to_name = $user_to_obj->getFirstandLastname(); $user_to = "to <a href='" . $row['user_to'] . "'>" .$user_to_name . "</a>"; } // check if user account was closed $added_by_obj = new User($this->con,$added_by); if($added_by_obj ->isClosed()){ continue; } $user_details_query = mysqli_query($this->con,"SELECT first_name,last_name,profile_pic FROM users where username = '$added_by'"); $user_row = mysqli_fetch_array($user_details_query); $first_name = $user_row['first_name']; $last_name = $user_row['last_name']; $profile_pic= $user_row['profile_pic']; ///time stamp $date_time_now = date("Y-m-d H:i:s"); $start_date = new Date_Time($date_time);////Time_of_post $end_date = new Date_Time($date_time_now);///Current_time $intervel = $start_date->diff($end_date); if($intervel->y >< 1 ){ if($intervel ==1 ) $time_message = $intervel->y . " year ago";/// 1 Year Ago else $time_message = $intervel->y . " years ago"; //1+ year ago } else if($intervel-> m >= 1 ){ if($intervel->d == 0){ $days = " ago"; } else if($intervel->d == 1){ $days = $intervel->d."day ago"; } else { $days = $intervel->d."day ago"; } if($intervel->m == 1){ $time_message = $intervel->m." month".$days; } else $time_message = $intervel->m." months".$days; } } else if($intervel->d >= 1){ if($intervel->d == 1){ $days = "Yesterday"; } else { $days = $intervel->d."days ago"; } } else if($intervel->h >= 1){ if($intervel->h == 1){ $time_message = $intervel->h." hour ago"; } else { $time_message = $intervel->h." hours ago"; } } else if($intervel->i >= 1){ if($intervel->i == 1){ $time_message = $intervel->i." minute ago"; } else { $time_message = $intervel->i." minutes ago"; } } else{ if($intervel->s < 30){ $time_message = "Just Now"; } else { $time_message = $intervel->s." seconds ago"; } } $str .= "<div class='status_post'> <div calss='post_profile_pic'> <img src='$profile_pic' width='50'> </div> <div calss='posted_by' style='color#ACACAC;'> <a href = '$added_by'> $first_name $last_name </a> $user_to ; ; $time_message </div> <div id = 'post_body'$body<br></div> </div> " } echo $str; } } ?> When i run this code this show me the error Parse error: syntax error, unexpected 'public' (T_PUBLIC) in C:\xampp\htdocs\social\Classes\Post.php on line 39 the line 39 is public function loadPostsFriends() I check the code again and again but i cant find the error please help in this error I have a script which creates a Thumbnail image if one does not exists, the problem is i keep getting this error: Catchable fatal error: Object of class SimpleImage could not be converted to string in /homepages/22/d378569747/htdocs/scripts/primary_image.php on line 21 i have checked the logs and i think its a read error because the the image is already in use by the server if i remove (!file_exists("$root/thumnail_user_images/$image")) the script work fine, is there anyway to stop this error occuring? <?php //header('Content-Type: image/jpeg'); $root = $_SERVER['DOCUMENT_ROOT']; require("$root/include/mysqldb.php"); //mysql login details require("$root/include/mysql_connect.php"); //mysql connect $uin = $_GET['uin']; $result = mysql_query("SELECT * FROM Reg_Profile_images WHERE UIN='$uin' AND `primary` = '1' LIMIT 1"); while($row = mysql_fetch_array( $result )) { $image = $row[2]; if (!file_exists("$root/thumnail_user_images/$image")) { require("$root/include/image_resizing_function.php"); //create image $image = new SimpleImage(); $image->load("$root/raw_user_images/$image"); $image->resizeToWidth(250); $image->save("$root/thumnail_user_images/$image"); $image->output(); } else { readfile("$root/thumnail_user_images/$image"); } } //End Image file ?> hi guys, i want to retrieve data from database table using select query store the result into an array in database class and then in view class e.g in html i want to make an object of that database class and call the array and display the data into html table. someone help would be appreciated. Thanks in advance. $handle = fopen("/etc/rpt.fifo", "r") or die("Unable to open file!"); $buffer = trim(fgets($handle)); $ary = explode (",", $buffer); $x = $ary[2]; print $x; flush(); pclose($handle); When I run it, it reports: Notice: Undefined offset: 2 on line 4 This is the line in /etc/rpt.fifo that is being read (there are 4 indices) 20210721153256,1100,TXKEY,89790 The error makes no sense to me but I'm no expert <g> Edited July 21 by KenHorseHello. I'm new to pHp and I would like to know how to get my $date_posted to read as March 12, 2012, instead of 2012-12-03. Here is the code: Code: [Select] <?php $sql = " SELECT id, title, date_posted, summary FROM blog_posts ORDER BY date_posted ASC LIMIT 10 "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { $id = $row['id']; $title = $row['title']; $date_posted = $row['date_posted']; $summary = $row['summary']; echo "<h3>$title</h3>\n"; echo "<p>$date_posted</p>\n"; echo "<p>$summary</p>\n"; echo "<p><a href=\"post.php?id=$id\" title=\"Read More\">Read More...</a></p>\n"; } ?> I have tried the date() function but it always updates with the current time & date so I'm a little confused on how I get this to work. <?php ini_set('display_errors', 0); function escapeArray($array) { foreach ($array as $key => $val) { if(is_array($val)){ $array[$key]=escapeArray($val); } else{ $array[$key]=addslashes($val); } } return $array; } $request_type=$_SERVER['REQUEST_METHOD']; $api_key=$_SERVER['HTTP_X_API_KEY']; $res=array(); if($api_key!=="643256432"){ $res['msg']="Failu Invalid API KEY"; echo json_encode($res); die; } // Connects to the orcl service (i.e. database) on the "localhost" machine //$conn = oci_connect('SCOTT', 'admin123', 'localhost/orcl'); $conn = oci_connect('test', 'test', '192.168.10.43/test.test.com'); if (!$conn) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } $request=file_get_contents("php://input"); $request=escapeArray(json_decode($request,true)); print_r($request); // die; if($request_type=="POST"){//for creation of invoice echo $CONTACT_ID=isset($request['CONTACT_ID'])?$request['CONTACT_ID']:""; $INV_SERIAL_NO=isset($request['INV_SERIAL_NO'])?$request['INV_SERIAL_NO']:""; $NAME=isset($request['NAME'])?$request['NAME']:""; $INV_DATE=isset($request['INV_DATE'])?$request['INV_DATE']:""; $DUE_DATE=isset($request['DUE_DATE'])?$request['DUE_DATE']:""; $CURRENCY=isset($request['CURRENCY'])?$request['CURRENCY']:""; $SUBTOTAL=isset($request['SUBTOTAL'])?$request['SUBTOTAL']:""; $TAX_TOTAL=isset($request['TAX_TOTAL'])?$request['TAX_TOTAL']:""; echo $SHIP_SERIAL_NO=isset($request['SHIP_SERIAL_NO'])?$request['SHIP_SERIAL_NO']:""; $MASTER_NO=isset($request['MASTER_NO'])?$request['MASTER_NO']:""; $HOUSE_NO=isset($request['HOUSE_NO'])?$request['HOUSE_NO']:""; $shipment_data=isset($request['shipment_data'])?$request['shipment_data']:""; if($CONTACT_ID==""){ $res['msg']="CONTACT_ID is required"; } else if($INV_SERIAL_NO==""){ $res['msg']="INV_SERIAL_NO is required"; } else if($NAME==""){ $res['msg']="NAME is required"; } else if($INV_DATE==""){ $res['msg']="INV_DATE is required"; } else if($DUE_DATE==""){ $res['msg']="DUE_DATE is required"; } else if($CURRENCY==""){ $res['msg']="CURRENCY is required"; } else if($SUBTOTAL==""){ $res['msg']="SUBTOTAL is required"; } else if($TAX_TOTAL==""){ $res['msg']="TAX_TOTAL is required"; } else if($MASTER_NO==""){ $res['msg']="MASTER_NO is required"; } else if($HOUSE_NO==""){ $res['msg']="HOUSE_NO is required"; } else if($SHIP_SERIAL_NO==""){ $res['msg']="SHIP_SERIAL_NO is required"; } else{ $stid = oci_parse($conn, "Select * from FL_HDR_INVOICE where CONTACT_ID='$CONTACT_ID'"); (oci_execute($stid)); oci_fetch_all($stid, $out); if(count($out['CONTACT_ID'])==0){ $stid = oci_parse($conn, "Insert into FL_HDR_INVOICE (CONTACT_ID,INV_SERIAL_NO,NAME,INV_DATE,DUE_DATE,CURRENCY,SUBTOTAL,TAX_TOTAL) Values ('$CONTACT_ID','$INV_SERIAL_NO','$NAME',TO_DATE('$INV_DATE','YYYY-MM-DD'),TO_DATE('$DUE_DATE','YYYY-MM-DD'),'$CURRENCY','$SUBTOTAL','$TAX_TOTAL')"); oci_execute($stid); $stid_2 = oci_parse($conn, "Insert into FL_SHIPMENT_DATA (CONTACT_ID,INV_SERIAL_NO,SHIP_SERIAL_NO,MASTER_NO,HOUSE_NO) Values ('$CONTACT_ID','$INV_SERIAL_NO','$SHIP_SERIAL_NO','$MASTER_NO','$HOUSE_NO')"); oci_execute($stid_2); if(oci_num_rows($stid)>0){ $res['msg']="Invoice created successfully against this contact_id:".$CONTACT_ID; } else{ $res['msg']="Something going wrong please try again later"; } } else{ $res['msg']="contact_id must be unique"; } } echo json_encode($res); die; } I need to read json data inside an array. Please help correct my code.. i am trying to do an API. Hi there... This array thing seems little strange and I had to turn to phpfreaks I have an array named: $optionInfo When we do: print_r($optionInfo); it displays all the values stored in the array i.e. Array ( [4] => Array ( [optionId] => 5 [optionName] => Blue - Medium [optionListId] => 4 [dateCreated] => [enabled] => 1 ) ) And as we can clearly see, we have the optionId value as 5. So therefore, when I type: Code: [Select] print_r($optionInfo[optionId]); It returns nothing. Even though there is a value 5 in the array but I just can't get the individual value of optionId. Is there something I am missing here. Kindly reply. Thank you! Cheers! This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=352249.0 I have a web site with a user login requirement that has worked splendidly for months. I also have a development version of my site on my laptop, localhost. At the moment, I have identical code on both the development and production sites. I'm getting some header error in production, but not on development. Is it guaranteed that my page is generating some white space, or is it possible that there may be another issue at hand (I'm fairly non-technical, so I'm grasping here - my web host upgraded to a different PHP version that is creating whitespace in production while development on my laptop is a different version of php, my web host has done something else that is causing this, fill in the blank with your own conspiracy theory)? Any reading material out there (besides the php.net manual) that explores what may be going on? Thanks in advance - this community has been wonderfully helpful for me over the last year! I want to create a singleton class that read multidimensional array from txt file and flatten the array retrieved. I am using apache web server on linux. I am using php for coding. My php code is not able to read the files from /var/tmp folder. If apache itself creates some files in /var/tmp folder then php code is able to read it. Why this permission denied issues are there though full access permissions are given to each file?
|