MudBytes
» MUDBytes Community » Coding Discussions » Web Related » Trouble with Query server and...
Pages: << prev 1 next >>
Trouble with Query server and qsfportal
tphegley
Sorcerer






Group: Moderators
Posts: 384
Joined: Aug 13, 2007

Go to the bottom of the page Go to the top of the page
#1 id:60517 Posted Feb 2, 2012, 2:08 pm

I have a PHP question. I'm having trouble getting information from a query string in a URL. I'm using qsfportal and everything is modular from the mysql database in table REGISTER_MAIN.

I've tried both:
Code (text):
<?php
echo $_SERVER['QUERY_STRING']
echo $_GET['cname'];
?>

Code (text):
<?php
echo 'Hello ' . htmlspecialchars($_GET["cname"]) . '!';
?>


And I keep getting the error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/bosweb25b/b857/ipw.tphegley/public_html/qsf/func/register.php(100) : eval()'d code on line 17

I'm not exactly sure 'how' to properly insert php code to get what I want especially with having all the modular tables for the qsfp forum software.

Thanks for any help.
Tyler
.........................
Admin of Legends of Old
Currently still in testing and design stage.

Last edited Feb 2, 2012, 2:09 pm by tphegley
kiasyn
Wizard






Group: Administrators
Posts: 1,132
Joined: May 15, 2006

Go to the bottom of the page Go to the top of the page
#2 id:60518 Posted Feb 2, 2012, 3:00 pm

Is this in your .php file or in your template?
.........................
http://www.mudbytes.net/kiasyn-sig.png

http://portal.hypernia.com/banners/hypernia_button.jpg http://www.shastaherps.org/badges/linode88.png

tphegley
Sorcerer






Group: Moderators
Posts: 384
Joined: Aug 13, 2007

Go to the bottom of the page Go to the top of the page
#3 id:60519 Posted Feb 2, 2012, 3:06 pm

I'm trying to put the php code into the register_main table in the mysql.

Here's the table:
Code (text):
<form action="{$this->self}?a=register" method="post">
{$this->table}
<div class="title">{$this->lang->register_reging}</div>
///////////////////<------------I want the php to go here so I can call the name and a few other queries into the register page.
<h1>Congratulations!</h1>
<p class="line"></p>
<span class="field">{$this->lang->register_new_user}</span>
<span class="form"><input type="text" name="desuser" size="40" /></span>
<p class="line"></p>

<span class="field">{$this->lang->register_email}</span>
<span class="form"><input type="text" name="email" size="40" /></span>
<p class="line"></p>

<span class="field">{$this->lang->register_passwd}</span>
<span class="form"><input type="password" name="passA" size="40" /></span>
<p class="line"></p>

<span class="field">{$this->lang->register_confirm_passwd}</span>
<span class="form"><input type="password" name="passB" size="40" /></span>
<p class="line"></p>

$math

<IF (!$tos_text)>
  <input type="hidden" name="terms" value="1" />
<ELSE>
  <span class="field">{$this->lang->register_tos_read}</span>
  <span class="form">{$tos_text}</span>

  <p class="line"></p>

  <span class="field">{$this->lang->register_tos_i_agree}</span>
  <span class="form"><input type="checkbox" name="terms" /></span>

  <p class="line"></p>
</IF>
<input type="hidden" name="token" value="$token" />
<input type="submit" name="submit" value="{$this->lang->register_reg}" />
{$this->etable}
</form>


There isn't a 'static' php page as it all loads into the index.php from the main site.

So it'd be site.com/index.php?a=register&item=1&cname=my+name&email=myemail%40gmail.com

I want to get cname and email from that and put it into the 'register' table.
.........................
Admin of Legends of Old
Currently still in testing and design stage.

Pages:<< prev 1 next >>

Valid XHTML 1.1! Valid CSS!