Page 2 of 2
Posted: Sat Feb 14, 2004 12:03 pm
by dimitris
Straterra wrote:Can you run this code for me please?
That's my results:
PHP Version: 4.3.1
Display Errors: Off
Error Level: Not E_ALL
Register Globals: On
It would be better if display errors was set to On!
Posted: Sat Feb 14, 2004 12:06 pm
by Straterra
Yeah, it would..I mean..jeez. With those settings, its hard to tell WHAT it is!
Posted: Sat Feb 14, 2004 12:12 pm
by dimitris
Straterra wrote:Yeah, it would..I mean..jeez. With those settings, its hard to tell WHAT it is!
I will send an email to the post-graduate who has the authority to maintain the webserver!
Posted: Sat Feb 14, 2004 12:14 pm
by Straterra
I think I also don't get is the fact that you never give your variables values..You just start off with $motherboard_report = ereg_replace("\r\n","<br>",$motherboard_report); . The way I can see that the variable has anything inside of it, is if you are putting stuff into it via connect.inc (require_once ("../../ww/connect.inc");).
Posted: Sat Feb 14, 2004 12:19 pm
by dimitris
Straterra wrote:I think I also don't get is the fact that you never give your variables values..You just start off with $motherboard_report = ereg_replace("\r\n","<br>",$motherboard_report); . The way I can see that the variable has anything inside of it, is if you are putting stuff into it via connect.inc (require_once ("../../ww/connect.inc");).
Ahh i see! $motherboard_report as well as the other variables are initiated from the previous page where there is a form with input buttons!
(Remember that i splitted the code into two pages!-The first is feeded with records about an existing record e.g. id:PC206-01 and then you submit all the changes to the second page update_step.php)
If you want i can give the url to test it yourself!
Posted: Sat Feb 14, 2004 12:23 pm
by dimitris
As i understand the blank pages aren't really blank but they should report various errors if the php.ini Display Errors was set to On.
Am I right?

Posted: Sat Feb 14, 2004 12:28 pm
by Straterra
Si, senor..Gimme a second and I will rewrite that page that SHOULD work.
Alrighty. First of all, use
Code: Select all
if(isset($POST['submit'])){
if((strlen($POST['new_id'])>0){
instead of
Code: Select all
if(isset($HTTP_POST_VARS['submit'])){
if((strlen($HTTP_POST_VARS['new_id'])>0){
Now, if the variable $motherboard_report is being posted to the document, use this to give the variable what is actually posted
Code: Select all
$motherboard_report = $Post['the_item_it_is_posted_from'];
Do this for every variable, but make sure to put it after
Code: Select all
if(isset($POST['submit'])){
if((strlen($POST['new_id'])>0){
and before
Code: Select all
$motherboard_report = ereg_replace("\r\n","<br>",$motherboard_report);
$lancard_report = ereg_replace("\r\n","<br>",$lancard_report);
$vgacard_report = ereg_replace("\r\n","<br>",$vgacard_report);
$soundcard_report = ereg_replace("\r\n","<br>",$soundcard_report);
$keyboard_report = ereg_replace("\r\n","<br>",$keyboard_report);
$mouse_report = ereg_replace("\r\n","<br>",$mouse_report);
$monitor_report = ereg_replace("\r\n","<br>",$monitor_report);
$speakers_report = ereg_replace("\r\n","<br>",$speakers_report);
$software = ereg_replace("\r\n","<br>",$software);
Posted: Sat Feb 14, 2004 12:30 pm
by dimitris
Straterra wrote:Si, senor..Gimme a second and I will rewrite that page that SHOULD work.
Gracias, senor..

Posted: Sat Feb 14, 2004 12:34 pm
by Straterra
Look up ^^^. I just edited my post from before.
Posted: Sat Feb 14, 2004 12:38 pm
by dimitris
Straterra wrote:Look up ^^^. I just edited my post from before.
Do you mean $_POST['xxxxx']
instead of $POST['xxxxx']
?
Thanks for your help!
Posted: Sat Feb 14, 2004 12:39 pm
by Straterra
LoL, yeah....
Posted: Sat Feb 14, 2004 12:48 pm
by dimitris
Straterra wrote:LoL, yeah....
I tested it with the same blank results unfortunately!
I don't use this technique with $x=$_POST['x']; with no problem in other pages!Such insert a new pc!
I have to go now unfortunately too! See my link to see the problem generated:
http://rainbow.cs.unipi.gr/~p01109/cs/t ... d=PC206-01