-
Posts
216 -
Joined
-
Last visited
Everything posted by Yohanne
-
if there is a selection option for year to show up the following you want. $query_list("SELECT year, quantity, name from BDNAME WHERE year = '$selected_year'"); $query_result = mysql_query($query_list); thin apply from guru suggestion and others.
-
thank you for all your responce and advice. and earlier from what you said, i check everyline and variable and i notice this $new = new new_request(); instead $new = new new_request_(); Couse->solve Thanks you
-
please help to define, where couse the error: i foud like this error Fatal error: Call to undefined method new_request::the_suppliment() public function the_suppliment() { foreach($_POST as $key => $values) { $mydata[$key] = $this->cleared($values); } if(isset($mydata['new']) && 'New' == $mydata['new']) { $this->set_query = ("INSERT INTO ocs_item_list(user_id,request,cat_name,prd_name,quantity,date_request) VALUES('$mydata[id]','$mydata[request]','$mydata[cat]','$mydata[subcat],'$mydata[quantity],'$mydata[thedate]')"); $this->var_result = mysql_query($this->get_query()) or die("$this->get_query". mysql_error()); } } } $nnew = new new_request(); $nnew->the_suppliment();
-
i have this "SELECT DISTINCT ocs_admin_new_item.cat_id,ocs_admin_new_item.prd_name,ocs_category.cat_id,ocs_category.cat_name FROM ocs_admin_new_item INNER JOIN ocs_category ON ocs_admin_new_item.cat_id = ocs_category.cat_id ORDER BY prd_name" now how can i DISTINCT the cat_id? where i have two table that i join?
-
any advice for what would i do? to do not happen it again? what security should i use? or is there i have to change for the security? please help need your all advice
-
select field with multiple sub-categories - too inefficient
Yohanne replied to 1internet's topic in PHP Coding Help
to add your logic simply follow this if you want to get what you want. http://i1323.photobucket.com/albums/u587/jayson_ph/jph_200004_zpsca9519b3.png from above use SELECT DISTINCT AND INNER JOIN -
try it. if the user is already in , in secute page you do not need to call this $errflag instead of calling the database parater to show up what you need to show.
-
i got it. Thanks
-
ya.. there is. <?php ?>
-
i really dont know what wrong with it. could please help to find out where i get mistake. Parse error: syntax error, unexpected ',' in line 13 which the line 13 is $Conn = (DB_SERVER_, DB_USER_, DB_PASS_) or die("Server not Conneceted".mysql_error()); define ('DB_SERVER_', 'localhost'); define ('DB_USER_', 'root'); define ('DB_PASS_', ''); define ('DB_NAME_', 'ocs_proton'); class DB_class { public function __construct() { $Conn = (DB_SERVER_, DB_USER_, DB_PASS_) or die("Server not Conneceted".mysql_error()); $X = mysql_connect($Conn); mysql_select_db(DB_NAME_($Conn)) or die("database not connected". mysql_error()); } }
-
use variable to catch-up your 200 value
-
use foreach statement/tag
-
if(isset($_POST['submit']) && 'Submit' == $_POST['submit']) { $post_array = array(); if(empty($_POST['value'])) { $post_array[] = 'text empty value'; } else { $_POST['value'] = mysql_real_escape_string($_POST['value']); } if(sizeof($post_array)> 0) { foreach($post_array as $new_array); echo $new_array; } } hope its help to add your conditional logic.
-
echo "<option value = ''>Select Category</option>"; echo "<select name = 'cat_name'>"; while($s = mysql_fetch_array($cat_class->get_the_result)) { echo "<option value = $s[cat_id]> $s[cat_name]</option>"; } echo "</select>"; a simple way, to get the record from database using select option, hope its help
-
so, what, exactly the problem you point out?
-
its okay for a beginner, to protice procedural coding like you show code above. and try to reconstruct your code or else use other way for insert.
-
WAMP server won't go online: Help
Yohanne replied to talk2toyin's topic in Other Web Server Software
try, other one like xampp it si not totally sensitive. -
in your welcome page or home.php you must set session session_start(); if(!isset($_SESSION['username'])) { header("Location:login.php"); exit(); } <p> Welcome : <?php echo $_SESSION['username']; ?></p>
-
doing good practice to declare variable" class myclass { private $val; function set_val($val) { $this->val = $val; } function get_val() { return $this->$val; } } $newval = new myclass(); $newval->set_val("my name is jayson"); echo $newval->get_val();
-
create another table, where your temporary file will save as your temporary.
-
do this. or simply remove else if(!mysql_num_rows($result)) { die("No user found by that username."); }
-
Hi all, Could you help if what is the correct syntax for this? <a href="javascript:void(0)" onclick = "window.open('newaccount.php?admin32=<?php echo substr(sha1($rows['a_id']),4,30) ?>','','top=60,left=250,right=200,width=300, height=500,menubar=no,alignment=center')">Account</a> and when i remove line below the code is working. ?admin32=<?php echo substr(sha1($rows['a_id']),4,30) ?>
-
something like this im doing: <?php if(isset($_GET['tab']) == 'newtab)') { $link = "newtab.php?"; foreach ($_GET as $key => $value) $link .= "$key=$value&we3333"; header("Location:$link"); } ?> <a href="?tab=newtab"><span>New</span></a> and the output is like this: en/newtab.php?tab=newtab&we3333 but sad to say from the (tab=newtab&we3333) is no value mean useless.. and i want every each number or letter is have a value, example i want to remove last number 3 and the page will get page not found!