PHP - Help Me - Parse Error: Parse Error, Expecting `t_variable' Or `'$''
echo "</select></td>\r\n </tr>\r\n \r\n <tr>\r\n <td align=\"right\">Total Views Allowed:</td>\r\n <td><input type=\"text\" id=\"ad_total_views\" style=\"width:50px;\" value=\"\" disabled=\"disabled\" /> <label><input type=\"checkbox\" checked=\"checked\" onclick=\"if(this.checked==true){$('#ad_total_views').val('');$('#ad_total_views').attr('disabled','disabled');}else{$('#ad_total_views').val('');$('#ad_total_views').removeAttr('disabled');$('#ad_total_views').focus()}\" />Unlimited</label></td>\r\n </tr>\r\n \r\n <tr>\r\n <td align=\"right\">Total Clicks Allowed:</td>\r\n <td><input type=\"text\" id=\"ad_total_clicks\" style=\"width:50px;\" value=\"\" disabled=\"disabled\" /> <label><input type=\"checkbox\" checked=\"checked\" onclick=\"if(this.checked==true){$('#ad_total_clicks').val('');$('#ad_total_clicks').attr('disabled','disabled');}else{$('#ad_total_clicks').val('');$('#ad_total_clicks').removeAttr('disabled');$('#ad_total_clicks').focus()}\" />Unlimited</label></td>\r\n </tr>\r\n </table></td>\r\n </tr>\r\n <tr bgcolor=\"#FFFFFF\">\r\n <td class=\"td_th\" align=\"center\">Smarty Code (Developer)</td>\r\n <td>{\$ads->getAdCode(<span id=\"smartycode\">1</span>)}</td>\r\n </tr>\r\n <tr bgcolor=\"#FFFFFF\">\r\n <td class=\"td_th\" align=\"center\"> </td>\r\n <td><input type=\"button\" value=\"Create New Campaign\" onclick=\"new_ad()\" /></td>\r\n </tr>\r\n </TBODY></TABLE>\r\n<br />\r\n\r\n<TABLE cellSpacing=1 cellPadding=4 width=\"100%\" border=0>\r\n <TBODY>\r\n <TR class=\"td_title\">\r\n <TD colSpan=7>Ad Campaigns</TD></TR>\r\n <TR bgColor=#ffffff>\r\n \r\n <TD width=\"10%\" align=\"center\" class=\"td_th\"> </TD>\r\n <TD width=\"4%\" align=\"center\" class=\"td_th\">ID</TD>\r\n <TD width=\"29%\" align=\"center\" class=\"td_th\">Campaign Name</TD>\r\n <TD width=\"12%\" align=\"center\" class=\"td_th\">Start Date</TD>\r\n <TD width=\"11%\" align=\"center\" class=\"td_th\">End Date</TD>\r\n <TD width=\"17%\" align=\"center\" class=\"td_th\">Viewed / Views Allowed</TD>\r\n <TD width=\"17%\" align=\"center\" class=\"td_th\">Clicked / Clicks Allowed</TD>\r\n </TR>\r\n ";
Similar TutorialsHello I have one problem with fwrite() I have one script to get width and height from javascript and echo it with PHP. echo "Screen width is: ". $_GET['width'] ."<br />\n"; echo "Screen height is: ". $_GET['height'] ."<br />\n"; It works but i want to store the result in a file fwrite($info,"Height: $_GET['height'] <br />"); But then I get error Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING //////////////////////// it would be even better if I don't have to print the values but directly store them in $iinfo sorry if something similar was soved but those examples were different or i was unable to transform it to solve my problem hi all am new to this forum help me to overcome from this error Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in D:\wamp\www\quiz1\quiz1.php on line 12 Code: [Select] <?php include("contentdb.php"); $display = mysql_query("SELECT * FROM $table ORDER BY id",$db); if (!$submit) { echo "<form method=post action=$_SERVER['PHP_SELF']>"; echo "<table border=0>"; while ($row = mysql_fetch_array($display)) { $id = $row["id"]; $question = $row["question"]; $opt1 = $row["opt1"]; $opt2 = $row["opt2"]; $opt3 = $row["opt3"]; $answer = $row["answer"]; echo "<tr><td colspan=3><br><b>$question</b></td></tr>"; echo "<tr><td>$opt1 <input type=radio name=q$id value=\"$opt1\"></td><td>$opt2 <input type=radio name=q$id value=\"$opt2\"></td><td>$opt3 <input type=radio name=q$id value=\"$opt3\"></td></tr>"; } echo "</table>"; echo "<input type='submit' value='See how you did' name='submit'>"; echo "</form>"; } elseif ($submit) { $score = 0; $total = mysql_num_rows($display); while ($result = mysql_fetch_array($display)) { $answer = $result["answer"]; $q = $result["q"]; if ($$q == $answer) { $score++; } } echo "<p align=center><b>You scored $score out of $total</b></p>"; echo "<p>"; if ($score == $total) { echo "Congratulations! You got every question right!"; } elseif ($score/$total < 0.34) { echo "Oh dear. Not the best score, but don't worry, it's only a quiz."; } elseif ($score/$total > 0.67) { echo "Well done! You certainly know your stuff."; } else { echo "Not bad - but there were a few that caught you out!"; } echo "</p>"; echo "<p>Here are the answers:"; echo "<table border=0>"; $display = mysql_query("SELECT * FROM $table ORDER BY id",$db); while ($row = mysql_fetch_array($display)) { $question = $row["question"]; $answer = $row["answer"]; $q = $row["q"]; echo "<tr><td><br>$question</td></tr>"; if ($$q == $answer) { echo "<tr><td>»you answered ${$q}, which is correct</td></tr>"; } elseif ($$q == "") { echo "<tr><td>»you didn't select an answer. The answer is $answer</td></tr>"; } else { echo "<tr><td>»you answered ${$q}. The answer is $answer</td></tr>"; } } echo "</table></p>"; } ?> thanks in adavance <?php error_reporting(E_ALL); include_once("conninfo2.php"); include_once('classes/bcrypt.php'); class User { private $_bcrypt; $this->_bcrypt = new Bcrypt; if($this->_bcrypt->verify($password, $this->data()->password)){ } if(isset($_POST['username'])) { $firstname = strip_tags($_POST['firstname']); $surname = strip_tags($_POST['surname']); $pnumber = strip_tags($_POST['pnumber']); $username = strip_tags($_POST['username']); $email1 = strip_tags($_POST['email1']); $email2 = strip_tags($_POST['email2']); $password1 = $_POST['password1']; $password2 = $_POST['password2']; //code below will make sure all fields are filled in if(trim($firstname) == "" || trim($surname) == "" || trim($pnumber) == "" || trim($username) == "username" || trim($email1) == "" || trim($email2) == "" ||trim($password1) == "" || trim($password2) == "") { echo "Error, all fileds need to be filled in"; $db = null; exit(); } //code below checks that the emails entered both match one another if($email1 != $email2) { echo "Emails do not match, please try again"; $db = null; exit(); } //code below matches the passwords entered else if($password1 != $password2) { echo "Passwords do not match please try again"; exit(); } if(!filter_var($email1, FILTER_VALIDATE_EMAIL)) { echo "Your email is invalid, please try again"; $db = null; exit(); } //checks if the email exists within the database $stmt = $db->prepare("SELECT email FROM login WHERE email=:email1 LIMIT 1"); $stmt->bindValue(':email1',$email1, PDO::PARAM_STR); try{ $stmt->execute(); $count = $stmt->rowCount(); } catch(PDOException $e) { echo $e->getMessage(); $db = null; exit(); } //checks if the username exists $usernameSQL = $db->prepare("SELECT username FROM login WHERE username=:username LIMIT 1"); $usernameSQL->bindValue(':username',$username,PDO::PARAM_STR); try{ $usernameSQL->execute(); $usernameCount = $usernameSQL->rowCount(); } catch(PDOExemption $e) { echo $e->getMessage(); $db = null; exit(); } //checks if the email is already within the database if($count > 0) { echo "This email already exists"; $db = null; exit(); } //checks the username if($usernameCount > 0) { echo "This username is unavailable please try another"; $db = null; exit(); } $user = new User; $bcrypt = new Bcrypt; try { $email1->create(array( 'username' => Input::get('username'), 'password1' => $bcrypt->hash(Input::get('password')), 'firstname' => Input::get('name'), 'surname' => Input::get('surname'), 'pnumber' => Input::get('pnumber'), 'email1' => Input::get('email'), 'ipaddress' => Input::get('ipaddress'), 'signup_date' => date('Y-m-d H:i:s'), 'group' => 1 )); //grab the last id used within the database $lastId = $db->lastInsertId(); $stmt3 = $db->prepare("INSERT INTO activated (user, token) VALUES ('$lastId', :token)"); $stmt3->bindValue(':token',$token,PDO::PARAM_STR); $stmt3->execute(); //email activation $from = "From Auto Responder @ Mediaedit <admin@mediaedit.com>"; $subject = "IMPORTANT: Please activate your account"; $link = 'http://mediaed.it/roxanne/activate.php?user='.$lastId.'&token='.$token.''; //email body $message = " Thanks for register with Mediaedit, before your able to use our services you will need to verify your email so that we know your human $link "; //headers $headers = 'MIME-Version: 1.0' . "rn"; $headers .= "Content-type: textrn"; $headers .= "From: Mediaedit"; //send email now mail($email1, $subject, $message, $headers, '-f noreply@mediated.it'); $db->commit(); echo "Thanks for registering, before you can us our services you need to activate your account an email has been sent which you will recieve shortly"; $db = null; exit(); } catch(PDOException $e){ $db->rollBack(); echo $e->getMessage(); $db = null; exit(); } } ?>i keep getting Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION I Can't find the problem. The code:
mysql_query("insert into games(week, fight, league_id)values($_REQUEST['week'],'$_REQUEST[home_team]-$_REQUEST[guest_team]',$_REQUEST['home_league'])", $Link);The error message: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING Having a problem with a php code. Im new to php and have only been learning for one day but have had previous experiances with php in which i have copied and pasted and edited to suit my needs . This is my code Code: [Select] <?php $username = $_POST["user"]; $password = $_POST["pass"]; $login = $_GET["login"]; setcookie("username","$username",time()+86400); if($login=="yes") { $con = mysql_connect("localhost","root","arceye"); mysql_select_db("login"); $get = mysql_query("SELECT count(id) FROM login WHERE user='$username' and pass='$password'"); $result = mysql_result($get, 0); if($result!=1) { echo "Invalid Username Or Password"; } else { echo "Login Successful" $_SESSION["username"] = $username; } } i named that login.php im running a wamp server thinge on localhost. when i try to run it on http://localhost/login.php i get the error Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\wamp\www\login.php on line 23 can anyone help i had 5 other error but managed to use common sense to fix them this one i cant seem to work out. Thanks in advance MOD EDIT: code tags added. Help me plaese - i am getting error in the line $query = "SELECT * \r\n FROM `ad` "; I am getting this error and cant figure it out: Parse error: syntax error, unexpected ')', expecting '&' or T_VARIABLE in /path/to/app/cool.php on line 150 this is line 50: function GetParentIDS(){ this is the rest of the function: global $wpdb; $CATS = ""; $Maincategories = get_categories('use_desc_for_title=1&hide_empty=0&hierarchical=0'); $Maincatcount = count($Maincategories); foreach ($Maincategories as $Maincat) { if($Maincat->parent ==0){ $CATS .= $Maincat->cat_ID.","; } } return $CATS; } this is the function above it: function sidebarArticles(){ global $wpdb; global $PPT; $string=""; $posts = query_posts('meta_key=type&meta_value=article&posts_per_page=5'); foreach($posts as $article){ $Artimage = get_post_meta($article->ID, 'image', true); $string .= "<li>"; if(strlen($Artimage) > 1){ $string .= '<a href="'.get_permalink($article->ID).'" title="'.$article->post_title.'"><img src="'.$PPT->ImageCheck($Artimage).'" style="float:right; max-width:40px; max-height:40px;" /></a>'; } $string .= "<h4><a href='".get_permalink($article)."'>".$article->post_title."</a></h4> <cite>Posted <em>".$PPT->TimeDiff($article->post_date)."</em></cite> <p>".$article->post_excerpt."</p> </li>"; } return $string; } Any ideas? Hi. I am having a problem with a php while loop.I am trying to draw a polygon using coordinates from a online data table called buildinglist.the loop is supposed to loop through each row drawing a polygon with each set of coordinates : <?php // Include file to Connnect to online database include_once "mysql_connect.php"; // Collects data from table $data = mysql_query("SELECT * FROM buildinglist") or die(mysql_error()); // puts the "buildinglist" info into the $info array // $info = mysql_fetch_array( $data ); ?> <!DOCTYPE HTML> <html> <head> <style type="text/css"> #theMap {background-image:url('MapImg.png'); } polygon:hover{fill:gold;} </style> <script type="text/javascript"> // This function is called when the lake is clicked. function buildingClick(<?php $id ?>) { // Display a fact. alert("<?php print $id; ?>"); } </script> </head> <body> <svg id="theMap" x="0" y="0" width="900" height="900"> <?php while($info = mysql_fetch_array( $data )){ //THE PROBLEM IS WITH THIS LINE// echo "<polygon fill="$info['fill_colour']" stroke="black" id="$info['id']" points="$info['coordinates']" />"; } ?> </svg> </body> </html> Can anybody help?it would be highly appreciated Eoin. $BoxSize = array("smallbox" = array("length" => 12, "width" => 10, "depth" => 2.5), "mediumbox" = array("length" => 30, "width" => 20, "depth" => 4), "largebox" = array("length" => 60, "width" => 40, "depth" => 11.5)); <?php require_once('nusoap.php'); $soap_server = 'http://www.domain.com/api/api.cfc?wsdl'; $client = new soapclient($soap_server); $client->call() $params = array('user' => 'username@domain.com', 'password' => 'PASSWORD'); $return_string = $client->call('getKey', $params); print_r($return_string); $subId = 'XXXXXX'; $params = array('keyStr' => $keyStr, 'subId' => $subId); $return_string = $client->call('getTodaySubIDStats', $params); print_r($return_string); unset($client); ?> spits out Parse error: syntax error, unexpected T_VARIABLE in /home/site82/public_html/stats.php on line 12 Line 12 is... $params = array('user' => 'username@domain.com', Hey, I just started using WordPress - I'm a complete newbie, and am super perplexed by this error I'm getting in functions.php. I'm hoping I am just making a simple mistake, but I'd really appreciate some suggestions as to what the issue is. The error: Parse error: syntax error, unexpected T_VARIABLE in /homepages/33/d123623052/htdocs/rap3/wp-content/themes/business-turnkey/functions.php on line 196 That line would be at the very bottom of my code. From what I can tell, this error occurs when the code is missing a punctuation mark like a [ ( { , ' etc. I've been looking over the code for ages, and from what I can see all the brackets have a matching end, there's no out of place punctuation. <?php define('THEME_URI', get_stylesheet_directory_uri()); define('THEME_IMAGES', THEME_URI . '/assets/img'); define('THEME_CSS', THEME_URI . '/assets/css'); define('THEME_JS', THEME_URI . '/assets/js'); define('THEME_TEMPLATES', THEME_URI . '/assets/templates'); $GLOBALS['content_width'] = 900; /* Define Theme Defaults */ $options = get_option('turnkey_theme_options'); if($options['templatestyle'] == null) $options['templatestyle'] = 'modern'; if($options['typography'] == null) $options['typography'] = 'typography1'; function turnkeySlider() { $options = get_option('turnkey_theme_options'); if($options['sliderTimer'] != null) $rotateTimer = $options['sliderTimer']; else $rotateTimer = 5000; ?> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function($) { $('.slide-container').cycle({ fx: 'scrollHorz',next: '#slide-nav .next',prev: '#slide-nav .prev',pause: 1, timeout:<?php echo $rotateTimer; ?>}); }); </script> <?php } add_action('wp_head', 'turnkeySlider'); require_once ( get_stylesheet_directory() . '/theme-options.php' ); require_once ( 'slider/turnkey-slider.php' ); if (function_exists('register_sidebar')) { register_sidebar(array( 'name'=> 'Homepage Widgets', 'id' => 'homepage_widgets', 'before_widget' => '<div class="widget group %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>' )); register_sidebar(array( 'name'=> 'Sidebar 1', 'id' => 'sidebar_1', 'before_widget' => '<div class="widget group %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>' )); register_sidebar(array( 'name'=> 'Sidebar 2', 'id' => 'sidebar_2', 'before_widget' => '<div class="widget group %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>' )); register_sidebar(array( 'name'=> 'Footer Widgets', 'id' => 'footer-widgets', 'before_widget' => '<div class="widget group %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>' )); } if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'turnkey_mainnav' => 'TurnKey Main Navigation', 'turnkey_secondary' => 'TurnKey Secondary Navigation' ) ); }; add_theme_support( 'post-thumbnails' ); // Makes Sure thumbnails show up in RSS function do_post_thumbnail_feeds($content) { global $post; if(has_post_thumbnail($post->ID)) { $content = '<div>' . get_the_post_thumbnail($post->ID) . '</div>' . $content; } return $content; } add_filter('the_excerpt_rss', 'do_post_thumbnail_feeds'); add_filter('the_content_feed', 'do_post_thumbnail_feeds'); // Define Thumbnail Images Sizes if ( function_exists( 'add_image_size' ) ) { add_image_size( 'post-thumb-threecol', 390, 200, true ); add_image_size( 'post-thumb-onetwocol', 520, 200, true ); /* Slide Image */ add_image_size( 'special', 580, 340, true ); } if ( !is_admin() ) { // instruction to only load if it is not the admin area function googlejquery() { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'); } add_action('init', 'googlejquery'); wp_register_script('functions', get_bloginfo('template_directory') . '/assets/js/functions.js'); wp_register_script('cycle', get_bloginfo('template_directory') . '/assets/js/cycle.min.js'); wp_register_script('lightbox', get_bloginfo('template_directory') . '/assets/js/lightbox_me.js'); // enqueue the script wp_enqueue_script('jquery'); wp_enqueue_script('functions'); wp_enqueue_script('cycle'); wp_enqueue_script('lightbox'); }; function the_breadcrumb() { if (!is_home()) { echo '<a href="'; echo get_option('home'); echo '">'; bloginfo('name'); echo "</a> » "; if (is_category() || is_single()) { the_category('title_li='); if (is_single()) { echo " » "; the_title(); } } elseif (is_page()) { echo " <span class='current'> "; echo the_title(); echo " </span> "; } } } function rap_register_sidebars() { register_sidebar(array( 'name' => 'Scheduling campaign sidebar', 'id' => 'rap-scheduling-sidebar', 'description' => 'Sidebar for Scheduling Campaign template pages only.', 'before_widget' => '<div class="widget">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>' )); } // Add Automatic Feed Links add_theme_support('automatic-feed-links'); add_filter('widget_text', 'do_shortcode'); add_action('widgets_init', 'rap_register_sidebars'); // Below added by Jessica 6/24/13 to display Salesforce lookup fields on Gravity Forms field mapping page add_filter('gf_salesforce_skip_reference_types', '__return_false'); // Below added by Jessica to change the field value on the Join Us and Training forms add_action("gform_pre_submission_1", "pre_submission_JoinUs"); add_action("gform_pre_submission_8", "pre_submission_Training"); add_action("gform_pre_submission_15", "pre_submission_HCAP"); function pre_submission_JoinUs($form){ if ($_POST["input_15"] == 'Former Retail Worker') $_POST["input_15"] = 'Retail Worker'; } function pre_submission_Training($form){ if ($_POST["input_18"] == 'Former Retail Worker') $_POST["input_18"] = 'Retail Worker'; } function pre_submission_HCAP($form){ if ($_POST["input_15"] == 'Former Retail Worker') $_POST["input_15"] = 'Retail Worker'; } ?> Edited by motprogram, 11 December 2014 - 04:33 PM. Hi all, Does anybody can help me with this error...? I am trying create a simple form which insert data into mysql table called 'sample' Here is my code... Code: [Select] <?php $connection = mysql_connect("localhost","root", "123"); if(!$connection) { die("db connection error" .mysql_error()); } $db_select = mysql_select_db("project", $connection); if(!$db_select) { die("db select error" .mysql_error()); } $sql = "INSERT INTO sample (id,firstname,lastname,bio,gender) VALUES ('$_POST['ID_']','$_POST['firstname']','$_POST['lastname']','$_POST['bio']','$_POST['gender']')"; if(!$sql) { die('Error: ' . mysql_error()); } echo "1 record added"; ?> And every time I am getting this annoying error Quote Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\project\process.php on line 19 and Line 19 is Code: [Select] ('$_POST['ID_']','$_POST['firstname']','$_POST['lastname']','$_POST['bio']','$_POST['gender']')"; Thanks in advance..! :-) I have been getting that error and I cannot figure out why it is happening Here is the error: Parse error: syntax error, unexpected T_ENDWHILE, expecting ',' or ';' in /home/scswc188/public_html/index.php on line 23 Here is my Code (Database Credentials removed for obvious reasons) <?PHP // Conect to the Mysql Server $connect = mysql_connect("IP","USER","PASS"); //connect to the database mysql_select_db("TABLE"); //query the database $query = mysql_query("SELECT * FROM users_online WHERE online = 1"); // fetch the results / convert into an array WHILE($rows = mysql_fetch_array($query)): $users = $rows['name']; echo "'<font color='black'>Online:<font color='green'>$users, </font></font>;" endwhile; ?> or here http://pastebin.com/ZYh4t2pD Thanks Edit: Found the php tag This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=315281.0 can't seem to find the error. helppp Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /export/SOI-50/students/m2009/abhr428/web/WebIbs/view_user.php on line 20 <?php require_once( "common.inc.php"); require_once( "config.php" ); require_once( "users.class.php" ); require_once( "LogEntry.class.php" ); $userid = isset( $_GET["userid"] ) ? (int)$_GET["userid"] : 0; if ( !$user = user::getuser( $userid) ) { displayPageHeader( "Error" ); echo "<div>User not found.</div>; displayPageFooter(); exit; } $logEntries = LogEntry::getLogEntries( $userid ); displayPageHeader( "View user: ". $user->getValueEncoded( "usr_name") ." ". $user->getValueEncoded( "usr_surname") ); ?> <dl style="width: 30em;"> <dt>Username</dt> <dd><?php echo $user->getValueEncoded( "usr_username" ) ?></dd> <dt>First name</dt> <dd><?php echo $user->getValueEncoded( "usr_name" ) ?></dd> <dt> Last name</dt> <dd><?php echo $user->getValueEncoded( "usr_surename" ) ?></dd> <dt>Joined on</dt> <dd><?php echo $user->getValueEncoded( "usr_recordtime") ?></dd> <dt>Last time active</dt> <dd><?php echo $user->getValueEncoded( "usr_lastlogintime" ) ?></dd> </dl> <h2> Access Log </h2> <table cellspacing="0" style="width":30em; border: 1px solid #667;"> <tr> <th>Web Page</th> <th>Number of visits</th> <th> Last visit</th> </tr> <?php $rowCount = 0; foreach ~( $logEntries as $logEntry ) { $rowCount++; ?> <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>> <td><?php echo $logEntry->getValueEncoded( "pageUrl" ) ?></td> <td><?php echo $logEntry->getValueEncoded( "numVisits") ?></td> <td><?php echo $logEntry->getValueEncoded( "lastAccess") ?> </td> </tr> <?php </table> <div style="width: 30em; margin-top: 20px; text-align: center;"> <a href="javascript:history.go(-1)">back</a> </div> <?php displayPageFooter(); ?> I just edited the tablerate.php in magento, and now I am getting this error, but I don't know what's wrong. Anybody here can help me?
The error message reads "Parse error: syntax error, unexpected '*', expecting function (T_FUNCTION) in /home/echoshom/public_html/app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php on line 50"
Attached is tablerate.php
Attached Files
Tablerate.php 9.23KB
2 downloads Hey, Its something to do with the ' or \ I know that as Ive been trying alot. Code Code: [Select] if ($this->isAdmin && count ($func_players) > SettingsManager::GetSetting(Settings::BAN_LIMIT)) return $this->sendErrorBox('max', 'You can\'t ban that many Users at once!', 'Gosh', 'iBan'); foreach($func_players as $func_player) $func_player->ban(&this->playerName, $this->isAdmin); return $this->sendErrorBox('max', sprintf( '%s ha%s been banned.' $this->getPlayerString($func_players), count($func_players) == 1 ? 's' : 've'), 'SykoPwns:P', 'Sykos:iBan'); Thanks for your help! Ive tried alot of things I think I could just take out the \ or something!! [Help] I can't solve this error
Message: Parse error: syntax error, unexpected '$N1' (T_VARIABLE), expecting ',' or ';' in /home/u969693299/public_html/sim/core/index.php on line 60
<?php
session_start();
if ($_SESSION["nim"]===NULL) {
echo "Silahkan untuk login";
require "login.html";
} else {
echo "Selamat datang " . $_SESSION["nim"] . ". Anda berhasil masuk "; $id = $_SESSION["nim"]; $DB_NAME = 'u969693299_data'; $DB_HOST = 'mysql.##########.com'; $DB_USER = 'u969693299_###'; $DB_PASS = '######'; $con=mysqli_connect($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql="SELECT nick1,nick9,nick6 FROM `Data` WHERE Nick1='$id'"; if ($result=mysqli_query($con,$sql)) { while ($row=mysqli_fetch_row($result)) { echo "Nim : ".$row[0] ." "; // 42 echo "Nama : ".$row[1]." "; // the email value echo "blablal : ".$row[2]." "; echo ' Lihat Nilai SEMESTER: 1 2 3 '; } $q=$_GET['semester']; if ($q===NULL) { ;} else{ $sql2="SELECT m1,m2,m3,m4,m5,m6,m7,m8,s1,s2,s3,s4,s5,s6,s7,s8,n1,n2,n3,n4,n5,n6,n7,n8,h1,h2,h3,h4,h5,h6,h7,h8,k1,k2,k3,k4,k5,k6,k7,k8 FROM `Semester1` WHERE NIM1='$id'"; if ($result=mysqli_query($con,$sql2)) { while ($row=mysqli_fetch_row($result)) { $m1=$row[0]; $s1=$row[8]; $N1=$row[16]; $h1=$row[24]; $k1=$row[32]; $m2=$row[1]; $s2=$row[9]; $N2=$row[17]; $h2=$row[25]; $k2=$row[33]; $m3=$row[2]; $s3=$row[10]; $N3=$row[18]; $h3=$row[26]; $k3=$row[34]; $m4=$row[3]; $s4=$row[11]; $N4=$row[19]; $h4=$row[27]; $k4=$row[35]; $m5=$row[4]; $s5=$row[12]; $N5=$row[20]; $h5=$row[28]; $k5=$row[36]; $m6=$row[5]; $s6=$row[13]; $N6=$row[21]; $h6=$row[29]; $k6=$row[37]; $m7=$row[6]; $s7=$row[14]; $N7=$row[22]; $h7=$row[30]; $k7=$row[38]; $m8=$row[7]; $s8=$row[15]; $N8=$row[23]; $h8=$row[31]; $k8=$row[40]; echo "Semester :".$no.""; echo "Mata KuliahSKSNILAIHMKeterangan"; echo "".$M1."".$S1."."$N1". ".$H1." ".$K1.""; echo "".$M2."".$S2."."$N2". ".$H2." ".$K2.""; echo "".$M3."".$S3."."$N3". ".$H3." ".$K3.""; echo "".$M4."".$S4."."$N4". ".$H4." ".$K4.""; echo "".$M5."".$S5."."$N5". ".$H5." ".$K5.""; echo "".$M6."".$S6."."$N6". ".$H6." ".$K6.""; echo "".$M7."".$S7."."$N7". ".$H7." ".$K7.""; echo "".$M8."".$S8."."$N8". ".$H8." ".$K8.""; } echo " "; echo " Keluar"; }} ?> |