Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
RP PHP Problems
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mango2735" data-source="post: 45525" data-attributes="member: 1460"><p><strong>1. How do i fix this php code so that it goes to a specific id not make a new table.</strong></p><p><strong>[PHP][/B][B]<?php [/B][/B][/B]</strong></p><p><strong>[php]<?php</strong></p><p><strong>/*================================================================+\</strong></p><p><strong>|| # PHPRetro - An extendable virtual hotel site and management</strong></p><p><strong>|+==================================================================</strong></p><p><strong>|| # Copyright (C) 2009 Yifan Lu. All rights reserved.</strong></p><p><strong>|| # http://www.yifanlu.com</strong></p><p><strong>|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.</strong></p><p><strong>|| # http://www.meth0d.org</strong></p><p><strong>|| # All images, scripts, and layouts</strong></p><p><strong>|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.</strong></p><p><strong>|+==================================================================</strong></p><p><strong>|| # PHPRetro is provided "as is" and comes without</strong></p><p><strong>|| # warrenty of any kind. PHPRetro is free software!</strong></p><p><strong>|| # License: GNU Public License 3.0</strong></p><p><strong>|| # http://opensource.org/licenses/gpl-license.php</strong></p><p><strong>\+================================================================*/</strong></p><p><strong></strong></p><p><strong>$page['allow_guests'] = true;</strong></p><p><strong>require_once('./includes/core.php');</strong></p><p><strong>require_once('./includes/session.php');</strong></p><p><strong>$lang->addLocale("credits.credits");</strong></p><p><strong></strong></p><p><strong>$page['id'] = "instert";</strong></p><p><strong>$page['name'] = "Insterted Page";</strong></p><p><strong>$page['bodyid'] = "home";</strong></p><p><strong>$page['cat'] = "community";</strong></p><p><strong></strong></p><p><strong>require_once('./templates/community_header.php');</strong></p><p><strong></strong></p><p><strong>$getGangID = $input->FilterText($_GET['gang_id']);</strong></p><p><strong>?></strong></p><p> <strong></strong></p><p><strong><?php</strong></p><p><strong>$con = mysql_connect("localhost","root","12051996");</strong></p><p><strong>if (!$con)</strong></p><p><strong> {</strong></p><p><strong> die('Could not connect: ' . mysql_error());</strong></p><p><strong> }</strong></p><p><strong></strong></p><p><strong>mysql_select_db("xoa", $con);</strong></p><p><strong></strong></p><p><strong>$sql="INSERT INTO gang_corps (color1, color2) WHERE gang_id='$getGangID' ";</strong></p><p><strong>VALUES</strong></p><p><strong>('$_POST[color1]','$_POST[color2]')";</strong></p><p> <strong></strong></p><p><strong>if (!mysql_query($sql,$con))</strong></p><p><strong> {</strong></p><p><strong> die('Error: ' . mysql_error());</strong></p><p><strong> }</strong></p><p><strong>echo "The Gang Colors have been Saved";</strong></p><p><strong></strong></p><p><strong>mysql_close($con)</strong></p><p><strong>?>[php]</strong></p><p><strong></strong></p><p><strong>[B][B][B]2. How do i also make it so it adds not just replaces.. So, if i want to add 3 to credits, it wont just make the table fro credits 3. it will add to it.[/B][/B][/B]</strong></p><p><strong></strong></p><p><strong>[B][B][B]3. How do i make a page where if a user ahs already been to it they can't go back. ;p[/B]][/B][/B][/B][/PHP]</strong></p></blockquote><p></p>
[QUOTE="Mango2735, post: 45525, member: 1460"] [B]1. How do i fix this php code so that it goes to a specific id not make a new table.[/B] [B][PHP][/B][B]<?php [/B][/B][/B] [php]<?php /*================================================================+\ || # PHPRetro - An extendable virtual hotel site and management |+================================================================== || # Copyright (C) 2009 Yifan Lu. All rights reserved. || # http://www.yifanlu.com || # Parts Copyright (C) 2009 Meth0d. All rights reserved. || # http://www.meth0d.org || # All images, scripts, and layouts || # Copyright (C) 2009 Sulake Ltd. All rights reserved. |+================================================================== || # PHPRetro is provided "as is" and comes without || # warrenty of any kind. PHPRetro is free software! || # License: GNU Public License 3.0 || # http://opensource.org/licenses/gpl-license.php \+================================================================*/ $page['allow_guests'] = true; require_once('./includes/core.php'); require_once('./includes/session.php'); $lang->addLocale("credits.credits"); $page['id'] = "instert"; $page['name'] = "Insterted Page"; $page['bodyid'] = "home"; $page['cat'] = "community"; require_once('./templates/community_header.php'); $getGangID = $input->FilterText($_GET['gang_id']); ?> <?php $con = mysql_connect("localhost","root","12051996"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("xoa", $con); $sql="INSERT INTO gang_corps (color1, color2) WHERE gang_id='$getGangID' "; VALUES ('$_POST[color1]','$_POST[color2]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "The Gang Colors have been Saved"; mysql_close($con) ?>[php] [B][B][B]2. How do i also make it so it adds not just replaces.. So, if i want to add 3 to credits, it wont just make the table fro credits 3. it will add to it.[/B][/B][/B] [B][B][B]3. How do i make a page where if a user ahs already been to it they can't go back. ;p[/B]][/B][/B][/B][/PHP][/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
RP PHP Problems
Top