Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





$_POSTs Remaining Empty?!


In writing to the flat file, only the ||||||s and the date function are being passed through. For some reason, the $_POSTs remain empty, or at least don't 'write'... I have tried different ways of building the $line variable but...nothing Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Time Remaining
I've searched the forums for a solution to this problem but can't find one that matches my needs.

I'm wanting a time remaining counter to show when a item placed on a market ends (similar to ebay).

I've set when the item ends as a future timestamp, now i need to calculate how many days, hours and minutes are left until that time, i can't figure it out.

View Replies !
Days Remaining
I want to find out number of days remain from birthday(any other day).

View Replies !
Remaining Value For Select Option
i've used $_SERVER[PHP_SELF] , so my form and script are just one file .
when a user click the submit and have some errors the sript reload again ,
for a reloaded script i've put :(for exaple)

<input type="text" name="username" value=$_POST[username] />

so when it reload the last information the uer has typed won't be delete.it stays.

i want to do the same with my "select menu " , i don't know how , the select menu reset when script reload :(example)

gender :
<select>
<option value="">select one</option>
<option value="m">male</option>
<option value="f">female</option>
</select>

View Replies !
Number Of Days Remaining
Im wanting to let users view something for 3 months from the date of joining, after this time it will be disabled and they will have to upgrade to get access again. I have read the information in the manuals regarding TO_DAYS but still cant firgure it out:PHP Code:

SELECT m_usertype, TO_DAYS(DATE_ADD(m_joined, INTERVAL 3 MONTH))-TO_DAYS(NOW()) as days_left FROM members WHERE m_id = USERID

How do i correct this?

View Replies !
How To Cut Text And Display It Plus The Remaining Texts
just wanna ask if there's a way I can limit the text length i wanna display and display the remaining text below...??

let's say here's my string:

$CallNum = $rows['CallNum'];

this contains : Q179:1546:554-abc

now i want to display this text like this:

Q179:
1546:
554-
abc

View Replies !
Create A Dropdown Of Remaining Months
I am attempting to figure out how I can do the following:

Take a date from a MySQL database like: 2006-06-01 (June 1, 2006)
Then have a dropdown list of remaining months using for example todays date of 2005-08-23
This would product a dropdown like:

1 month
2 months
3 months
4 months
......
10 months

View Replies !
Enter A New ROW After 3rd Image For 5 Rows And Then New Page For Remaining Results
I want to show 3 images per row and show 5 rows per page, that would be 3 images X 5 rows = 15 images. per page and then press next to go to next page to see if there are more images for that user. This is a script for making two users friends of each other. Code:

View Replies !
Ftp_nlist Returns False For Empty Directory Instead Of Empty Array
In an application installed with PHP5 it looks like ftp_nlist() returns
false if the directory is empty, instead of an empty array as it should
according to the manual. On the original server with PHP4 it works as
expected.

Is this a bug, or an undocumented change in PHP5, or a setting that
could be changed somewhere?

View Replies !
Getting "true" Number Of Days Remaining ?
im writting a script, that alerts me when a set number of days are remaining to an event...(which im fine with!!!) The problem that i have, is the way that im getting the remaining days, the script is dividing the results by the number of seconds in the day...

So say that today is the 3rd July and the alert is excuted at 1pm, the the script will return 1 day, if say the event was on the 5th July....logically thinking it would return 1 day, but phyiscally there are two days remaining. PHP Code:

View Replies !
Getting "Days Remaining"
I have written a program that gets the date, and compares it with a "Sale Date". If the current date is before the sale date (November 22nd, 2007), it will print "Sale is on!". If it is after, it will print "Sale is over...".

$freestuffdate = "22-11-07";
$today = date("d-m-y");
if ($freestuffdate >= $today){
echo "Sale is on!<br />";
}
elseif ($freestuffdate<$today){
echo "Sale is over...<br />";}

I am wondering if there is any way to make a code that prints out how many days are left until the end of the sale. How can I tell PHP to subtract $today from $freestuffdate, so that it tells me how many days are left from the current date and the sale date?

View Replies !
PHP Session Is Empty And Session File Is Empty
I am trying to save a SESSION variable which looks to succeed because right after I print it out to verify it. I do so as follows:

session_start();
<snip>
$_SESSION['security_code'] = $code;

The problem is that I submit a form on the same page and I need to check if the $_SESSION['security_code'] == $_POST['security_code'] however this condition is always false because $_SESSION['security_code'] is empty.  I also checked the security files that are created in the PHP 'save_path' directory and it appears to be creating an empty session file.

Can anyone suggest anything here?  Also prior to the condition, I also do a session_start() and that doesn't help either.

I got this code from a open source area and on that web site, if I test it it works fine.  On my localhost it does not work.  I'm not sure if I'm missing some configuration or whether PHP 5.2.2 has problems with sessions.

View Replies !
Using Empty And &&
Im checking to see if all of these are empty I have to do something:

if (empty($_POST['phhome'] && $_POST['phcell'] && $_POST['phwork'] &&
$_POST['email'])) {

But this isnt working and putting empty() around each didnt either. What
I'm I not seeing?

View Replies !
Help With Empty()
this is my php:

$pro1=addslashes($_POST['pro1']);
$pro2=addslashes($_POST['pro2']);
$pro3=addslashes($_POST['pro3']);
$pro4=addslashes($_POST['pro4']);
$pro5=addslashes($_POST['pro5']);

for ($i=1;$i==5;$i++){
if (!empty(${'pro'.$i}))
$pros.=${'pro'.$i}."";
}
echo nl2br($pros);

$pros return nothing, although $pro1 and $pro2 contain certain value...

View Replies !
Using If Empty
I am trying to use the if empty statment to make sure that every input box has been filled, the code looks like this. Code:

if(empty($inputbox)){
print "you did not fill in a box.";}

This works fine but there is about 20 input boxes and there must be an easier way to insted of repeating this 20 times.

View Replies !
Empty If / Else ?
I have never done this, but I have an if/else statement, and if I don't want anything to happen in the if statement, should I leave it empty or is there something that I could add???

A simple example (my actual code is much longer):
<?php
if(empty($_POST['fname'])){

}else{
     $name = $_POST['fname']
     mysql_query("INSERT INTO name(`first`) VALUES ('$name'));
}?>

View Replies !
Empty &lt;p&gt;&lt;/p&gt; How To Get Rid Of
I'm setting up a home made Content Management System, running a loop that outputs every line of an external text file with <p> in front and </p> at the end. If a line is empty it outputs <p></p>. An empty line is created each time I hit the return key twice.

My validator in Safari ("SafariTidy (http://zappatic.net/safaritidy/)") complains and gives warning about inaccurate code, saying an empty <p> is not allowed. I'm using html 4.01 strict as DTD.

Questions:

1. Should I just ignore the warning? (feels bad to not see the green check mark anymore)

2. Is there a way to skip empty lines? I tried FILE_SKIP_EMPTY_LINES (http://www.php.net/file) but it did not work - perhaps I used it wrongly. On the other hand I read that it's a bug (http://www.mail-archive.com/php-bugs@lists.php.net/msg97959.html) in PHP... I'm testing all locally running PHP 5.22 on Macintosh Tiger 10.4.10.

3. Is there a way to erase the string <p></p> before writing the loop to the output file?

I'm using a plain text file (created by TextMate (http://www.macromates.com/), a Macintosh application) using LF line feeds (my server is Apache) which I include in a page:

<?php
error_reporting(E_ALL);
$arr_content = file('text.txt', FILE_SKIP_EMPTY_LINES);
foreach($arr_content as $p) {
echo '<p>'.$p."</p>";
}
?>

View Replies !
Empty Value - Set A Value
The variable $new_course is not set a value but my below error checking doesn't seem to when the value is empty. It continues on with the rest of the code. Why is this?

if(!isset($new_course) || ($new_course != ""))
{
   echo '<p>Please enter a new course</p>'     
   echo '<p><a href="javascript:history.back(1)">Return</a></p>'
   exit;
}

View Replies !
An Empty Value
I have a problem which Ido not know how to solve in php, I'll explain. I have built a registration form , and set required fields. now what I wanna do is I want it to check if all the fields are filled in , and to send a message to him if one or more isn't , and deny the registration. like, in pascal , the empty value goes like: if X=' ' then.
does anyone know how it goes in php? I've tried that and it isn't really working. In addition , what i get when trying this is "Not all required fields are filled" , even when they all are . here's my code. PHP Code:

<?php
$con = mysql_connect("xxx","xxx","xxx");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("regist",$con);

$sql="INSERT INTO person (name, lastname, username, password, email, gender, notes)
.............

View Replies !
Empty($bla
Are these two statements exactly the same?

if (empty($bla)){
echo "this is empty"
}
&

if ($bla == ""){
echo "this is empty"
}

View Replies !
Empty Value
if (empty($var)) { ... }

the same as this:

PHP Code:

if ($var == '') { ... }

View Replies !
SQL Empty Of Now
I've got a sql line ,

"SELECT * from mytable where user = $user"

View Replies !
Empty()
Its use is in part cleaning vars before DB insertion. I have this but is there a better more performance focused way of writing the snippet bellow.

$strValue=($strValue==&#390;')?&#390;zero':$strValue;
$strValue=(empty($strValue))?'NULL':$strValue;
$strValue=($strValue==&#390;zero')?&#390;':$strValue;

View Replies !
Using Empty()
I was under the (possibly mistaken) impression that if you check an array using empty() it will *never* be empty, however, this script reports that the array is not empty: PHP Code:

$tmp = array();
if (empty($tmp)) {
  echo 'shiver me timbers!  it *is* empty!'
} else {
  echo 'i told you so! na na na na na na!'
}

I tested this on a php5 server. Is there a difference in how empty works on php4 and php5. More importantly, is it considered the *correct* way to see if an array has any elements or not.

View Replies !
Testing For Empty Set?
basically, i want to query my db and see if the user has input a valid #.... if it matches a record im my table 'plu_coupons' then i will execute the code that allows a user to proceed... if the number input by the user does not match any of my records, he/she will be redirected to the sign-in page...

View Replies !
How To Empty An Array?
I've got a nested array, which I populate while processing and formatting results from a query. When I print the contents of the array I want to clear it so that I can use it again in the next iteration of the loop without the stuff I've printed still in it. Is there a straight forward way to do this? I've tried re-declaring it but that doesn't empty it.

View Replies !
Empty Sessions
When sessions are created by my message board or any other script. The sessions I can see inside the /tmp folder but when I open em up with pico I see NOTHING! no session variables or anything!!

I have been tryin to figure this out forever here is my php.ini configuration for sessions

[Session]
session.save_handler = files ; handler used to store/retrieve data
session.save_path = /tmp ; argument passed to save_handler
; in the case of files, this is the
; path where data files are stored
session.use_cookies = 1 ; whether to use cookies
session.name = PHPSESSID
; name of the session
; is used as cookie name
session.auto_start = 1 ; initialize session on request startup
session.save_handler = files ; handler used to store/retrieve data
session.save_path = /tmp ; argument passed to save_handler
; in the case of files, this is the
; path where data files are stored
session.use_cookies = 1 ; whether to use cookies
session.name = PHPSESSID
; name of the session
; is used as cookie name
session.auto_start = 1 ; initialize session on request startup
session.cookie_lifetime = 0 ; lifetime in seconds of cookie
; or if 0, until browser is restarted
session.cookie_path = / ; the path the cookie is valid for
session.cookie_domain = ; the domain the cookie is valid for
session.serialize_handler = php ; handler used to serialize data
; php is the standard serializer of PHP
session.gc_probability = 1 ; percentual probability that the
; 'garbage collection' process is started
; on every session initialization
session.gc_maxlifetime = 1440 ; after this number of seconds, stored
; or if 0, until browser is restarted
session.cookie_path = / ; the path the cookie is valid for
session.cookie_domain = ; the domain the cookie is valid for
session.serialize_handler = php ; handler used to serialize data
; php is the standard serializer of PHP
session.gc_probability = 1 ; percentual probability that the
; 'garbage collection' process is started
; on every session initialization
session.gc_maxlifetime = 1440 ; after this number of seconds, stored
; data will be seen as 'garbage' and
; cleaned up by the gc process
session.referer_check = ; check HTTP Referer to invalidate
; externally stored URLs containing ids
session.entropy_length = 0 ; how many bytes to read from the file
session.entropy_file = ; specified here to create the session id
; session.entropy_length = 16
; session.entropy_file = /dev/urandom
session.cache_limiter = nocache ; set to {nocache,private,public} to
; determine HTTP caching aspects
; cleaned up by the gc process
session.referer_check = ; check HTTP Referer to invalidate
; externally stored URLs containing ids
session.entropy_length = 0 ; how many bytes to read from the file
session.entropy_file = ; specified here to create the session id
; session.entropy_length = 16
; session.entropy_file = /dev/urandom
session.cache_limiter = nocache ; set to {nocache,private,public} to
; determine HTTP caching aspects
session.cache_expire = 180 ; document expires after n minutes
session.use_trans_sid = 1 ; use transient sid support if enabled
; by compiling with --enable-trans-sid

PLEASE I NEED HELP!!

my /tmp is chmoded to 777 and I have tried everything...

I know it isnt my forums because they worked on another server I transfered from and also it affects more than just the forums... every scripts that uses sessions is affected...

View Replies !
Empty Array?
I have a query that selects some data from a table based on the current ID
selected.

If the query does not return any results, I want it to continue to another
query that will insert a record into the table.

Below is what I have...but it will not insert anything if the first query...

View Replies !
PHP_AUTH_USER Is Empty
I use basic authentication in Apache. I like to use the global variable
$_SERVER['PHP_AUTH_USER']. Unfortunately this variable is empty/no
availabe. Same with PHP_AUTH_PW. AUTH_TYPE is working and states
"Basic".

View Replies !
PHP Variables Are Always Empty
I'm trying to write a PHP script which allows to enter an username and a
password and to click two buttons.
If I start my PHP scripts 'mytest.php' I see the two input fields and the
two buttons. However if I enter something to the input fields and press a
button the echo commands show nothing.

======

PHP script 'mytest.php'
-----------------------

<?php
session_start();

if (!isset($_SESSION['auth_ok'])) {
$_SESSION['auth_ok'] = false;
}

echo "$user <br>";
echo "$pass <br>";
echo "$button1 <br>";
echo "$button2 <br>";
echo "$auth_ok <br>";

if (isset($button1)){
echo "Button 1 has been pressed<br>";
$auth_ok = true;

View Replies !
Php Shows Up Empty
I havea problem with a php page, everytime I call it it presents me
with an empty page, with only

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-
1252"></HEAD>
<BODY></BODY></HTML>

as if have only made an empty php-page, I cannot figure out what the
problem is, can anyone help me. (I have made a test page with only <?php ?> run it and it gave me the exact same result)

View Replies !
Empty Variables In 4.2.1+
I have a site where I check to see if a variable isset to see which file I include on a page - the URL would be something like: http://www.domain.com/?s

Then in the PHP file I check to see: PHP Code:

View Replies !
Htaccess Must Be Empty
I am moving some php scripts to a new host. While getting to know the
server, I ran into a strange problem.

If I add a .htaccess file, or more specifically: a .htaccess with
content, to a folder, requesting (html and php) files from that folder
results in internal server error messages.
If I upload an empty .htaccess file, all is fine. Then phpinfo() tells
me I am using Apache/1.3.27.

View Replies !
$_POST Of Empty Vs 0 Value
working on LINUX I found that both empty($_POST['foo']) where $foo = 0 or &foo = empty gives me TRUE. I.e. I can not distingush between 0 and empty value - I need it for the text box value. What is the solution?

View Replies !
Empty The Database
Is there a command that will empty or delete all the information in a database but keep the structure of the database so new information can be added to it?

View Replies !
Empty Lines
i read the filr into an array using file().
some of the lines are empty. i would like to output the file but
ignoring the emnpty lines.

View Replies !
Empty Form
Say I have a form, a really long form, is there a way to check if all the fields in the form are empty without saying a million if statements?

View Replies !
Empty Vs. Isset
I have a user form where users input float values or integers. If I want to see if no value has been input, I use the empty() function.  But if I want to see if users HAVE input a value that is a float or an integer, what function should I use?

View Replies !
How To Empty An Array??
I have an array being created a number of times with in a loop, before it is created I want to check if it empty and if it isn't then clear it down. How do I do this?

View Replies !
If Statement And Empty
i have my form and what i want to happen is when ALL the values are not empty i want to process the form but if just one of the values is empty i want top redisplay the form i have 15 values in my form, i know thats quite a lot but i need them all
so how would i do this? Code:

View Replies !
Using If Empty With Two Items
I am trying to say if $_Post and $_Session are empty set the variable $dcparent to equal 1, but it doesn't like what I am doing. 

if(isset($_POST['dcparent'])) {
$dcparent = mysql_real_escape_string($_POST['dcparent']);
}

if(isset($_SESSION['dcparent'])) {
$dcparent = mysql_real_escape_string($_SESSION['dcparent']);
}

if(empty($_POST['dcparent']) && (empty($_SESSION['dcparent'])) {
$dcparent = 1;
}

View Replies !
Empty Query
How can I tell if a query is empty:

I need to test this

$get_buddys = mysql_query($query_get_buddys) or die ("Invalid query". mysql_error());

View Replies !
Empty Spaces
Everytime I retrieve text from database into this Textarea, it creates empty spaces before and after the text. When I fill in the text in the textarea I make sure it has no spaces, but still when I retrieve it back into the textarea it show spaces. Database is very simple:

num, Smallint(1)
mytext, Text

Code to retrieve data:
<textarea name="mytext" cols="75" rows="15" class="FormFieldText" style="border:1 solid #999999">
         <?PHP
           if ($row[0] =='') //test for empty fields
           {echo "Sorry, Thought of the Week not defined yet!";}
            else
           {echo $row[0];}
         ?>
</textarea>...

View Replies !
Retrieve Empty Row
I'm trying to retieve all the rows in my table product_data where the column pd30 has no value inputed (Nul). I cannot syntax my recordset properly. Should I use !empty to locate the nul values or something else. here is where I'm at (I know this is wrong and doesnt work, but it gives the idea of what I'm trying to do): PHP Code:

SELECT * FROM product_data WHERE product_data.pd30 = !empty

guide me to fixing this?

View Replies !
Ignore If Empty
i have a script that enters details into a database table from another table, but i want it to ignore a insert command if a field is empty. E.g query customer database then if email field is not empty the script should then enter the email address in another table, but if the email field is empty it should ignore inserting email address (as its empty) into another table.

View Replies !
Empty Variables
is there a bether way to do this? PHP Code:

function validateEmpty($theinput,$description = '') {
                if (empty($theinput)) {
                        $this->errors[] = $description;
                        return false;
                } else {
                        return true;
              .....

View Replies !
Empty $FILES
I have tryed to implement some file upload on a webpage. I have a form
containing:

<input type="hidden" name="MAX_FILE_SIZE" value="102400">
<input name="userfile" type="file">

and on the action-script I have:
print_r($_FILES);

The result is:
Array ( )

If I check $_POST the userfile contains the correct path to the selected
file, but somehow the file is newer uploaded, or???

View Replies !
Empty Substring
I am recieving the following errors:

Warning: substr_count() [function.substr-count]: Empty substring. in /home/ventajas/public_html/contacto/send.php on line 3

Warning: main(error.) [function.main]: failed to open stream: No such file or directory in /home/ventajas/public_html/contacto/send.php on line 27

Warning: main() [function.include]: Failed opening 'error.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ventajas/public_html/contacto/send.php on line 27

Its a php mail script. When I visit the URL http://<domainname>/contacto.php and fill the email form, it is redirected to send.php with the avobe errors.

View Replies !
Empty An Array
I have elements in a array and I want to clear it so that it only returns Array () (empty array), whats the easiest way to do this?

View Replies !
Directory Is Empty
I am trying to delete a directory I keep getting an error saying that the directory is not empty and can not be delete. I want to put an error check into my code to check if the directory is empty or not but the problem is that i do not know how to write something like this.

View Replies !
Query Was Empty!?!
I designed a page, and as usual, i echo the output queries until i am happy, then i will remove that and run the queries for the finished page. Code:

View Replies !
Trim() Or Empty()
i have this to test if a field has been filled in. Code:

View Replies !
Set Variable = 0, If Empty.
I am trying to get info from the database in a query and match it to a different table and then insert back into the main table. The issue I'm having is some of the fields are empty/don't match, so the variable $team1 or $team2 is empty and that causes an error in the insert query. Code:

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved