1,003 Posted Topics
Re: Hi, if this-> $sysid is a php variable, then try changing your code <a href='delete.php?id=$sysid' class='view' onClick='del()'> <img src='image/vie.png' border='0'> </a> to this <a href='delete.php?id=<?php echo $sysid;?>' class='view' onClick='del()'> <img src='image/vie.png' border='0'> </a> | |
Re: @faisals701, You need to change $_REQUEST to $_POST.. Anyone can send a remote upload on your form if that's how you are going to process it. For added security, a unique ID should be auto generated by your script and plugged it in in your session.. Example of a unique … | |
Re: Is the admin and the user logging in from the same terminal or desktop? Does the admin updates info. by logging in as the user by way account over-ride? If your case is neither of the things I mentioned above, then you may want to add another column on your … | |
Re: Hi, Is this for the faculty and student views? If for both, the student can easily spoof your form, and they can have 100% grades on all of the terms prelim, midterm and finals.. Just my humble advice :). Show the grades to student as text string and NOT on … | |
Re: Hi, PHP will not be able to check the file size before the file upload is executed. There is no way you can detect on the desktop's directory. File upload has to occur first, and then the script checks on the file size.. There is another way of doing this.. … | |
Re: Hi, Your upload script is highly susceptible for malicious script upload e.g. php script. You need to define the file extension you are willing to accept from user. The script above of which you have presented us can take any file extensions. 1. Your script could either use javascript to … | |
Re: Please allow me to add something. Since that the php closing tag is already in placed .. shown below. [CODE] ?> <tr> <td width="250px"><?php echo '<a href="ProfileDoctor.php" style="color:#33FF00;">$dname</a>'; ?></td> [/CODE] it can be rewritten as this [CODE]?> <tr> <td width="250px"><a href="ProfileDoctor.php" style="color:#33FF00;"><?php echo $dname; ?></a></td> [/CODE] Still the same as … ![]() | |
Re: Hi, Look for line 72 grade.php [CODE]$$key = $value;[/CODE] it should be [CODE]$key = $value;[/CODE] Try using some PHP IDE like netbeans or eclipse... others settled in for advance php editor like personal php designer 2007. The good thing about them, they are all for FREE.. Load your entire script … | |
Re: If I can help you, can I at least get a free Bus pass? Where is this place though? :). If it is too far from Princeton, New Jersey, it's ok :). Stop punishing your fingers by typing these [CODE] <select name='dep_day'> <option>Day</option> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option … | |
Re: Hi, For this [CODE]<select name="birdname"><option value="<?php echo $row['bird_id'] , $row['name']?>">[/CODE] I would $_POST it first to get the value from the <option>, and then explode it by " [B]'[/B] " Something like this.. codes below are example and should be modified, before implementing to production server.. [CODE]$bird_name_id = $_POST['birdname']; ## … | |
Re: Hi, Just a humble question from me :)...I thought when using the RecursiveIteratorIterator class goes by this pattern [CODE]$the_iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($some_arr)); [/CODE] So, by looking at your codes, I assumed that your are trying to filter the $the_iterator by RegexIterator which is obviously are images. on your codes, … | |
Re: You need to install EITHER one ->> Xampp, LAMP, or EasyPHP on your windowsXP environment. | |
Re: Wow, can you please give us more explanation on what you are trying to achieved here. I thought when you do this; [CODE] INSERT INTO `YourTable`(`col-1`, `col-2`, `col-3`) VALUES ("",[value-2],[value-3]) [/CODE] That should give you an empty value for the col-1.. or you can set the table null -> Yes … | |
Re: try searching for free available services. Google is our friend.. Writing an application like this takes time. But if all you need is a raw flat file based chat script... I can probably show you how, but it is no guarantee when I could do this, because of my time … | |
Re: Hi, Try adding a new column and name it role.. and then it is all up to you how are you going to assign values to sort between teacher and student. For example, if we are to give an integer 7 for the role of teacher and a value of … | |
Re: Hi, Can you please give us more detail.. to sort your array, you can easily do this by and it will give you an ordered dates regardless if you put 01/20/2012 in front of the array. [CODE]$dates_ar = array('01/01/2012','01/20/2012','01/02/2012','01/03/2012','01/05/2012','01/10/2012'); sort($dates_ar); ## we can echo foreach ($dates_ar as $date => $val) … | |
Re: Hi, Try this script... I derived this from the tag cloud script I wrote when I was a newbie. This is my very first tag cloud script, and the very first time that I wrote a function.. The original script was pretty good. It almost took me forever trying and … | |
Re: Hi, Here is my humble contribution using [B]FETCH_CLASS[/B] PDO object.. I posted this as a response in one of the question weeks ago. I brushed it up a little to become relevant to your question. [CODE]<?php class User{ ## Property declaration NOTE! All these variables or properties are the column … | |
Re: Hi, Many ways to achieve this... some people in smarty community where I used to hangout a lot, they were using an xml for translation, while others uses a module of which I can't even remember its name. Another common method is the direct translation for example, create a language … ![]() | |
Re: Hi, These codes [CODE] $sql="SELECT * FROM $tbl_name WHERE invoice_no = '$invoiceno'"; $result=mysql_query($sql,$dbh1); $row=mysql_fetch_array($result) or die(mysql_error()); echo "$row"; [/CODE] Shouldn't be a lot easier to find if rows is greater than zero? Something like this [CODE] $sql="SELECT * FROM $tbl_name WHERE invoice_no = '$invoiceno'"; $result=mysql_query($sql,$dbh1); $row= mysql_num_rows($result) or die(mysql_error()); echo … | |
Re: Hi, You can use the unix time if you want. Normally, more people are using this because the chance of duplicates is somewhat pretty rare. Think about having two people clicking the same button at the same time . You can use like this [CODE] $time_posted = $time(); [/CODE] You … | |
Re: Hi, Before anything else, can you please check what is the value of your [B]upload_max_filesize[/B] and [B]post_max_size[/B]. These are in the php.ini file or on your loaded server configuration file. I also suspect that your server's php version has been upgraded.. Just copy, save, name anyNameYouWant.php, upload to your server, … | |
Re: Hi, You only use countryCode[0], when there are multiple countryCode . for example, [CODE] <?xml version="1.0" encoding="UTF-8"?> <Response> <statusCode>OK</statusCode> <statusMessage></statusMessage> <ipAddress>2.99.203.40</ipAddress> <countryCode>UK</countryCode> <countryCode>UK1</countryCode> <countryCode>UK2</countryCode> <countryName>UNITED KINGDOM</countryName> </Response>[/CODE] If I want to parse the coutryCode for UK, my script should be something like this.Assuming that the above file is named xml.xml. … | |
Re: Hi, You can add two columns in your customer's table. One is for temp_password, and second is for the temp_passAge. We can then use time as comparator for the time elapsed since the temp password was created. Example: [CODE] ## assign server time to ctime $ctime = time(); ## you … | |
Re: Hi, You can add <input> to your form and give them a name unique to the pizza size. Fore example, take a look at the codes below.. [CODE] <INPUT TYPE=checkbox NAME="pica10" VALUE="S">10" Php300 <input type="text" name="sq" value=""/> <INPUT TYPE=checkbox NAME="pica14" VALUE="M">14" Php450 <input type="text" name="mq" value=""/> <INPUT TYPE=checkbox NAME="pica18" VALUE="L">18" … | |
Re: Hi, jUst a friendly advice.. next time, enclose your codes with the [B][COLOR="Red"]code[/COLOR][/B] tag located on top of the editor. It is a lot easier to red codes this way.. | |
Re: This is our point of interest [CODE]<select name="select" id="select">[/CODE] Process the form by either GET or POST [CODE] ## grab the selected aution id $a_id = $_POST['select']; $query1 = "SELECT * FROM auctions WHERE auction_id = '".$a_id."'"; $result1 =mysql_query($query1,); while ($row=mysql_fetch_array($result1)) { ## echo item title description, and all other … | |
Re: Hi, The linked is based on zend extension.. If you have not work with zend framework before that would be very tricky. If you just need the same functionality as zend without breaking the peggy bank, thene consider the following codes. I posted these codes on my previous post in … | |
Re: Hi, I can explain it in simple words without too many comments needed The Input ---> The Processing of the Input ---> The output or the outcome of the processed input. In short, Controller(input) --> model(processing) --> View(output or template).. Sample script Controller [CODE] ## checks if members logged in … | |
Re: Hi, I did this type of testing in Paypal sandbox, too many times already. BUT, not to offend you or anything, can you please put your codes between the CODE tags. Then only that time when you did that, I will help you.. It gives me a terrible head ache … | |
Re: Hi, If the id is coming from auto increment, then it would be difficult to guess which is which. I know it is easy if you are looking at it, but programatically it will be difficult for the script. I mean you can do >22, but that is not the … | |
Re: Hi, Do you mean text link to submit the form? Actually, you can use images if you want. We cannot accomplish this by using PHP. It has to be javascript.. I was going to advice you to post your question in the javascript forum, but I figured out the codes … ![]() | |
Re: Hi, It is getting really late in my time zone, that I really need to hit the bunk. Anyways, here is the general form for xpath in php.. I am not going to explain it in great detail, but the whole idea is well presented. [CODE] <?php $xml = simplexml_load_file("../category.xml"); … | |
Re: Hi, The problem is that you never define additional properties for your database connection.. Here is a simple example AND SHOULD NOT be used in production site. I am just trying to give you a simple example. You still need to do some dirty work and lots of reading about … | |
Re: Hi, It all depends on server configuration. You will need to find out these configurations by using the codes below. Save as anyfileYoulike.php [CODE] <?php phpinfo(); ?> [/CODE] Upload to your server and direct your browser to this file. Look for the value of [B]Server API [/B]. If your server … | |
Re: Hi, You want to run this script from remote desktop and pass the gathered info. over the network? Just for the sake of curiosity, what are you trying to achieved? ![]() | |
Re: try, look for javascript redirect. The only problem with this approach is that it will not work if javascript is turned off. [CODE] echo '<script type="text/javascript"> <!-- window.location = "http://YourDomainDotCom/uploads/$contact_name/index.html"; //--> </script>'; [/CODE] Otherwise, you must end the script just right after your redirection code. Something like this [CODE] header("Location: … | |
Re: I think OOP first, singleton second (this is important in some environment), templating system third. Getting very comfortable with those three might change your perception about MVC. If it doesn't, make MVC fourth (try cake or codeigniter):). I prefer Zend framework, because I already spent all of my monthly allowance, … | |
| |
Re: Hi, Try to isolate what is the mysql_fetch_array output..So, you may want to try running a test query instead. Something like this [CODE] if (!($rows = mysql_fetch_array($sql3))) { return null; ## or maybe to print or echo something if there is none, but the return null has to be commented … | |
Re: does your db table anketa have columns at all? What i meant is that you want the script to insert the data to your dbase with all these values, but what column does these data needs to be inserted? | |
Re: UPDATED: Please ignore my response below. I think I have a wrong assumption, because I run a test class to see it cycling has effects or not, but unfortunately based on my model it has no bearing at all.. dummy script extracted from a class used for evaluation. [CODE] function … | |
Re: hmmn is this mysqli? Wow! have not seen this for years.. try [CODE] $stmt->bind_param('ss', $username, $password); ## prepare your statements $username = "define it here"; $password = "define it here also"; ## now execute the prepared statements above $stmt->execute(); [/CODE] ONly then, you can begin with your query or whatever … | |
Re: by the way, you can consolidate your statements as [CODE] <?php include "connect.php"; if ($idevice =="pbs") { $tb_school = "Public School"; } elseif ($school =="gs") { $tb_school = "Government School"; } else { $tb_device = $school; } ?> [/CODE] | |
Re: Hi, next time place your codes between the [CODE} tags... just like what I did to your codes below. [CODE] <?php $searching=$_POST['searching']; $searchfilm=$_POST['searchfilm']; //If form is submitted if ($searching =="yes") { echo "<h2>Film Review</h2><p>"; //If field is empty send a message if ($searchfilm == "") { echo "<p>You forgot to … | |
Re: Hi, try to set up an AND operator, like [CODE] if(($gravity == 0)&&($weight == 0)){ ## show something, instead of the calculated value here. } else{ ## show calculation if both the gravity and the weight are greater than zero } [/CODE] Test your codes by removing the value in … | |
Re: try.. make sure the directory and the file name are properly assigned below. [CODE] if (file_exists($attcid."whatever.extensionOfFile"){ @unlink($attcid."whatever.extensionOfFile") ; } else{ echo "Are you kidding me? This file don't even exist. I already looked."; } [/CODE] | |
Re: Hi, change your codes to this [CODE] <?php if(isset($_POST['submit'])) { ?> <form method="post" action=""> <input type="submit" name="submit1" value="Style1"> </form> <form method="post" action=""> <input type="submit" name="submit2" value="Style2"> </form> <form method="post" action=""> <input type="submit" name="submit3" value="Style3"> </form> <form method="post" action=""> <input type="submit" name="submit4" value="Style4"> </form> <form method="post" action=""> <input type="submit" name="submit5" value="Style5"> … | |
Re: try changing this [CODE] mysql_query("INSERT INTO users(name, country) VALUES('$username', '$country' ) "); or die(mysql_error()); [/CODE] to this [CODE] mysql_query("INSERT INTO users(name, country) VALUES('$username', '$country' ) ") or die(mysql_error()); [/CODE] The T_LOGICAL_OR error is caused by [COLOR="Red"][B];[/B][/COLOR] the or die is part of your statement and should not be separated from … |
The End.