| | |
simple php script fix
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 2
Reputation:
Solved Threads: 0
I have a simple php script that I want to use with GET
mysite.com/script.php?site=value&plug=value
site will be a domain name
plug will be a URL
It works if I only pass 1 value:
mysite.com/script.php?site=value
But it fails when using both values. Get forbidden error.
here is the code
Im guessing this is a pretty easy fix.
Thanks.
mysite.com/script.php?site=value&plug=value
site will be a domain name
plug will be a URL
It works if I only pass 1 value:
mysite.com/script.php?site=value
But it fails when using both values. Get forbidden error.
here is the code
php Syntax (Toggle Plain Text)
<?php include("dbconnect.php"); $sitex = $_GET["sitex"]; $plugx = $_GET['plugx']; $query1 = "UPDATE sites SET `out` = `out` +1, `totout` = `totout` +1 , `balance` = `balance` + 1 WHERE `site` = '$sitex' "; mysql_query($query1) or die('Error, insert query failed. ERROR: '. mysql_error()); header("Location: $plug"); /* Redirect browser */ ?>
Im guessing this is a pretty easy fix.
Thanks.
Last edited by peter_budo; Jun 1st, 2009 at 2:27 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Well fisrt off ytour get is retreiving names that don't have an x in the yet you put it at the end...
Can you give us more of an idea what the forbidden error is. Either a screen shot or an exact copy of the text displayed.
Thanks.
Can you give us more of an idea what the forbidden error is. Either a screen shot or an exact copy of the text displayed.
Thanks.
Posts should be like mini-skirts, long enough to cover enough, but not too long that you cover too much.
My Liveperson: http://liveperson.com/josh-connerty/
My Liveperson: http://liveperson.com/josh-connerty/
![]() |
Similar Threads
- Using simple php redirect script but need to pull information from mysql instead (PHP)
- very simple login script (checking 2 variables before writing cookie) (PHP)
- Onclick to pass a variable to a PHP script (JavaScript / DHTML / AJAX)
- PHP how to send results from one query to another php script (PHP)
- Simple article manager script in PHP I wrote (PHP)
- IP-to-Country converter (php script) (PHP)
- question about connecting odbc to sql through php script (PHP)
- Need help with Mail php script!! (PHP)
Other Threads in the PHP Forum
- Previous Thread: Select a Row in MySQL
- Next Thread: Help adding the value of 2 drop down lists to linking table.
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube





