I have a problem as good as everything works just the admin not so the admin menu webmall /? act = admin
and when i open http:// (myip ) /webmall/include/admin.php
i get this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
show me your admin.php code
and you should access it like this http:// (myip ) /webmall/?act=admin
if ( !!$_FILES['image']['tmp_name'] ) // is the file uploaded yet? { $info = explode('.', strtolower( $_FILES['image']['name']) ); // whats the extension of the file
if ( in_array( end($info), $allow) ) // is this file allowed { if ( move_uploaded_file( $_FILES['image']['tmp_name'], $todir . basename($_FILES['image']['name'] ) ) ) { $imgname = $_FILES['image']['name']; $add = $sql->query(" insert into $webDB.._donateItems (itemname,itemCode,itemPrice,itemImage,itemDescription,itemPlus,uniqueID,quantity) values ('$itemname','$itemcode','$itemprice','$todir/$imgname','$itemDesc','$itemplus','$uniqueID','$quantity')"); if($add->execute()) { echo "<label class=bg-success>Item Was Added!</label>"; } else echo $add->errorInfo()[2]; } } else { echo "<label class=bg-danger>Something Went Wrong!</label>"; } }
if ( !!$_FILES['image']['tmp_name'] ) // is the file uploaded yet?
{
$info = explode('.', strtolower( $_FILES['image']['name']) ); // whats the extension of the file
if ( in_array( end($info), $allow) ) // is this file allowed
{
if ( move_uploaded_file( $_FILES['image']['tmp_name'], $todir . basename($_FILES['image']['name'] ) ) )
{
$imgname = $_FILES['image']['name'];
$add = $sql->query("
insert into $webDB.._donateItems
(itemname,itemCode,itemPrice,itemImage,itemDescription,itemPlus,uniqueID,quantity)
values
('$itemname','$itemcode','$itemprice','$todir/$imgname','$itemDesc','$itemplus','$uniqueID','$quantity')");
if($add->execute())
{
echo "<label class=bg-success>Item Was Added!</label>";
}
else
echo $add->errorInfo()[2];
}
}
else
{
echo "<label class=bg-danger>Something Went Wrong!</label>";
}
}
}
?>
</center>
http:// (myip ) /webmall/?act=admin =
i can't see any problem in this script i guess it's your webserver :S i use ZendServer 8.5 PHP 5.6
public function CharsByUser($username) { $q = "SELECT TOP 4 * FROM $this->shardDB.._Char tb1, $this->shardDB.._User tb2 WHERE tb1.CharID = tb2.CharID AND tb2.UserJID=(select JID from $this->accDB..TB_User where StrUserID='$username')"; return $this->query($q); }
It can be more than 4 characters, better you will count them..
Get used to use require_once function instead of include function, it can prevent few problems in the future./
That's what I saw in the 2 minutes that I was looking at your code,
maybe I'll find more later, then I'll edit this comment.
public function CharsByUser($username) { $q = "SELECT TOP 4 * FROM $this->shardDB.._Char tb1, $this->shardDB.._User tb2 WHERE tb1.CharID = tb2.CharID AND tb2.UserJID=(select JID from $this->accDB..TB_User where StrUserID='$username')"; return $this->query($q); }
It can be more than 4 characters, better you will count them..
Get used to use require_once function instead of include function, it can prevent few problems in the future./
That's what I saw in the 2 minutes that I was looking at your code,
maybe I'll find more later, then I'll edit this comment.
Quote:
The require() function is identical to include(), except that it handles errors differently. If an error occurs, the include() function generates a warning, but the script will continue execution. The require() generates a fatal error, and the script will stop.
Quote:
The require_once() statement is identical to require() except PHP will check if the file has already been included, and if so, not include (require) it again.
i agree that using preg_replace isn't the best solution I just didn't want to use bindparam to make the code understandable for people who never used PDO
more than 4 chars in vsro? idk about that the only server that has more than 4 chars was myth i'm not sure if this name was correct
you will find a lot of useless shit in my code i don't recommend using it!
i will probably post a new version later :3
idk how require_once will prevent few problems in the future. would you explain more?
i agree that using preg_replace isn't the best solution I just didn't want to use bindparam to make the code understandable for people who never used PDO
more than 4 chars in vsro? idk about that the only server that has more than 4 chars was myth i'm not sure if this name was correct
you will find a lot of useless **** in my code i don't recommend using it!
i will probably post a new version later :3
idk how require_once will prevent few problems in the future. would you explain more?
Require_Once is more efficient.
About the part of more than 4 characters on vsro,
I commented about that because I had a problem because of that ****,
in the server that I'm working on now there is option to open more than 4 characters, and while I was doing some tests to the server, I had a bug because of that..
About the part of more than 4 characters on vsro,
I commented about that because I had a problem because of that ****,
in the server that I'm working on now there is option to open more than 4 characters, and while I was doing some tests to the server, I had a bug because of that..
Waiting for the next version, good job
idk how you see require_once more efficient while it's basically the same except it handles errors differently and checks if the file was already included in this case we include the file only once in the index and never include it again i don't see why you're obsessed with require_once maybe you didn't read the quotes on Stackoverflow?
idk how you see require_once more efficient while it's basically the same except it handles errors differently and checks if the file was already included in this case we include the file only once in the index and never include it again i don't see why you're obsessed with require_once maybe you didn't read the quotes on Stackoverflow?
Thank you and i will improve it in my free time
He's right, require_once is better than include because it includes the files just once, in some times, include will include the page few times then you will see the page few times.
He's right, require_once is better than include because it includes the files just once, in some times, include will include the page few times then you will see the page few times.
if you like require_once you can use it :3 i prefer using include if possible
WEBmall 01/08/2015 - Shaiya PServer Development - 0 Replies can anyone me explain how i fixing the webmall...3 items per line not 1 and added packages dont work.please
webmall 07/26/2014 - Shaiya Private Server - 1 Replies im searching fora webmall for mssql and hp, have anyone this?
Help with webmall. 02/19/2014 - Shaiya PServer Development - 2 Replies Tell me the name of the program with which to create a sql query in web mall?
I would be very grateful.
Webmall Mssql 10/09/2013 - Shaiya Private Server - 0 Replies Hello all
I was using search engine to find some thread on webmall working under ms sql... and i find the one of Treica But it says that its not working with new version of xampp / php apache because i am not using xamp or other...
Just someone know please where i can get one working webmall under mssql ?
(if the one of treica is working for some ppl who get experience with it, how to make it working with mssql because all the php are with mysql function thx):mofo:
Thank you very...
WebMall Problem 09/14/2013 - Shaiya Private Server - 0 Replies Hello ,
http://i.epvpimg.com/lpP7d.jpg
I want to remove those commas which are put between item names when item is more than one (Item Pack). How can I remove those commas and make it only one name as it is in single item add.
Like this :
http://i.epvpimg.com/UGmBg.jpg