Jump to content

tarantoo

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tarantoo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can I use something else, something without glob() ?
  2. It is because glob() has failed and returned false. -- and how to fix this?
  3. Hello, Dear friends can you help me with this piece of code.. <?php error_reporting(E_ALL); ini_set('display_errors', '1'); $host = ""; // your mysql server address $user = ""; // your mysql username $pass = ""; // your mysql password $databasename = ""; // your mysql database session_start(); $data = null; if(!(@mysql_connect("$host","$user","$pass") && @mysql_select_db("$databasename"))) { exit; } include_once 'functions.php'; require_once "includes/pluggable.php"; foreach( glob("plugins/*/index.php") as $plugin) { require_once($plugin); } hook_action('initialize'); $site = mysql_fetch_object(mysql_query("SELECT * FROM settings")); ?> I am keep getting warning error for line 22... this line:" foreach( glob("plugins/*/index.php") as $plugin) { " it says PHP warning: Invalid argument supplied for foreach() Can somebody please help me recode it, or tell me what is the problem? I know that is array problem, but don't know how to fix this btw. Can this be host error? Thanks ahead!
  4. lol, I just need help.. better donate something than nothing...
  5. I didn't get this working.. I don't know cULR, and I cant find good example. I still need help, and will give 5$, or donate to anybody who helps me. This is what I did for now: With this form I'm sending - The problem is that i'm using <form action> and then this gets redirected and i don't want that, also the coins dont get substracted because the form itself doesnt impact the PHP code because redirection, good thing is that reciever of cois get those coins. <?php include 'header.php'; if(isset($data)) { foreach($_POST as $key => $value) { $posts[$key] = filter($value); } if(isset($_POST['add'])){ if($data->coins <=99){ echo "Error! You Don't Have Enough Coins"; }else{ $ext1 = mysql_query("SELECT * FROM `users` WHERE `username`='{$_SESSION['username']}'"); $ext = mysql_fetch_object($ext1); if($ext->id != ""){ mysql_query("UPDATE `users` SET `coins`=`coins`-'{$_POST['coins']}' WHERE `username`='{$_SESSION['username']}'"); $message = "<div class=\"message success\"><h3>Sucess! "; }} } ?> <div class="contentbox"> <div class="head">Send Coins</div> <div class="contentinside"> <?php if(isset($error)) { ?> <div class="error">ERROR: <?php echo $error; ?></div> <?php } if(isset($success)) { ?> <div class="success">SUCCESS: <?php echo $success; ?></div> <?php } if(isset($warning)) { ?> <div class="warning">WARNING: <?php echo $warning; ?></div> <?php } ?> <form class="contentform" method="post" action="http://www.razmjeni.com/test/r.php"> User:<br/> <input type="text" name="user"/><br/><br/> Coins: <input type="text" name="coins"/><br/><br/> <br/><br/> <input style="width:100%;" name="add" type="Submit"/> </form> </div> </div> <?php } else { echo "Please login to view this page!"; } include 'footer.php'; ?> And this is receive form - basicly the same as above, only it sums up the coins.. <?php include 'header.php'; if(isset($data)) { foreach($_POST as $key => $value) { $posts[$key] = filter($value); } if(isset($_POST['add'])){ $ext1 = mysql_query("SELECT * FROM `users` WHERE `username`='{$_POST['user']}'"); $ext = mysql_fetch_object($ext1); if($ext->id != ""){ mysql_query("UPDATE `users` SET `coins`=`coins`+'{$_POST['coins']}' WHERE `username`='{$_POST['user']}'"); } } ?> <div class="contentbox"> <div class="head">Send Coins</div> <div class="contentinside"> <?php if(isset($error)) { ?> <div class="error">ERROR: <?php echo $error; ?></div> <?php } if(isset($success)) { ?> <div class="success">SUCCESS: <?php echo $success; ?></div> <?php } if(isset($warning)) { ?> <div class="warning">WARNING: <?php echo $warning; ?></div> <?php } ?> <form class="contentform" method="post"> User:<br/> <input type="text" name="user"/><br/><br/> Coins: <input type="text" name="coins"/><br/><br/> <br/><br/> <input style="width:100%;" name="add" type="Submit"/> </form> </div> </div> <?php } else { echo "Please login to view this page!"; } include 'footer.php'; ?> I need your help with this, the steps I need are: No redirection! And I can send coins to where ever the URL is specified, i.e to any server I want.
  6. Hello, I want to ask you, how to code the next problem I want to transfer some coins from site A to site B, I have access to both sites. My question is, how can I update table on site B, when I send request for updating on site A. Basicly, I need to transfer value from site A, and site B should receive this value, and update table. How can I do it, what do I need?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.