331 Posted Topics

Member Avatar for Midgard

Can only see this for 2 more things to try http://www.bestwpthemez.com/wordpress/case-study-php-fatal-error-out-of-memory-2360/ Only other thing i could think of is the see the code see if we can make it more efficient

Member Avatar for Biiim
0
189
Member Avatar for arctushar

> <input type="hidden" name="secure" value=" > <?php > echo $_SESSION['randomnum']; > ?>" /> Is that putting a return/tabs into the value? try: <input type="hidden" name="secure" value="<?php echo $_SESSION['randomnum']; ?>" /> If not its probably getting converted in some way in the post, try changing > echo $a.'<br/>'.$b; to var_dump($a); echo …

Member Avatar for Biiim
0
136
Member Avatar for sowh4t

<?php $Q = "SELECT * FROM `mysqltable` ORDER BY `money` DESC"; $R = mysql_query($Q); $i = 1; if($R !== false){ while($row = mysql_fetch_assoc($R)){ //echo "{$row['username']} is position number {$i}<br/>\r\n"; if($row['username'] == $_SESSION['username']){ echo "You are position number {$i}<br/>\r\n"; } $i++; } }else{ echo "no results returned :".mysql_error(); } ?>

Member Avatar for sowh4t
0
79
Member Avatar for cpat258

Try updating the `if($rows['email_number'] < $rows['email_limit']){` section to this: <?php if($rows['email_number'] < $rows['email_limit']){ $to = 'test@njit.edu'; $from = 'ckp22@njit.edu'; $header = "From: $from \r\n"; $header .= "Content-type: text/html; charset=iso-8859-1" . "\r \n"; $subject = "Incident Report Copy"; $message = '<html> <body> <b>Your requested E-mail copy...</b> <p></p> <h3>Hello, '.$name. '</h3> <font …

Member Avatar for Biiim
0
118
Member Avatar for robertj17

empty($Noise) //too many )) Should be empty($Noise)){ Cause it's inside an if statement, i added the curly bracket cause im not sure how it acts without them - i think it only will execute the next single line of code if you don't add a curly bracket else { //to …

Member Avatar for Biiim
0
87
Member Avatar for anita.kcx

Hows this work for you: <?php $unique_user_id = $confirmed_logged_in_user_id; if(isset($_POST['submit'])){ $i = 0; $setsql = ''; foreach($_POST as $k=>$v){ $dbfields = array('field1','field2','field3'); if(in_array($k,$dbfields)){ $data[$k] = str_replace('"', "&quot;", $v); $data[$k] = str_replace("'", "&#39;", $data[$k]); if($i == 0){ $setsql .= "`{$k}` = '{$data[$k]}'"; $i = 1; }else{ $setsql .= ",`{$k}` = '{$data[$k]}'"; …

Member Avatar for Biiim
0
193
Member Avatar for mandy011
Member Avatar for manishraj1988

<a href="javascript:" onclick="window.open('http://www.google.co.uk', 'Google', 'height=500, width=700');">popup window</a> also for IE, page titles cannot contains spaces

Member Avatar for Biiim
0
60
Member Avatar for mrcniceguy

If you are asking for a php script to do this - It's actually against the Google terms of use to run any automated requests on their servers. http://support.google.com/webmasters/bin/answer.py?hl=en&answer=66357 Personally i don't know why Google don't just release a site rank lookup for a particular keyword, cause however they forbid …

Member Avatar for Biiim
0
95
Member Avatar for mogaka

give the barcode box an id of "barcodeBox" then as the barcode reader finishes use this javascript: document.getElementById('barcodeBox').focus(); If it's not ran using javascript, add in a fake input box just after the barcode that has no use, and give it an onfocus script eg. <input type="text" style="height:1px;width:1px;" onfocus="document.getElementById('barcodeBox').focus();"/> so …

Member Avatar for Biiim
0
91
Member Avatar for rayidi

> fopen("http://api.studentmug.com/bulksms/sms.php?Username=<something>&Password=<something>", "r"); Try using the local address to the file instead eg: fopen("C://webhosting/studentmug.com/api/bulksms/sms.php?Username={$username}&Password={$password}", "r"); If that doesnt work you could combine it with what Marplo said and use file_get_contents() - i use file_get_contents with GET variables so i know that one will translate a web address But is there …

Member Avatar for Biiim
0
217
Member Avatar for harintfs

you can set it once in your php.ini file on the server if you are on a dedicated server. Otherwise yes you probably will need to set it on every page, you could make an include file so you only need to call the file on every page. sessionStart.php <?php …

Member Avatar for harintfs
0
187
Member Avatar for guidely

I feel your pain Is room types a limited option? ie. Theres 7 room types and you don't want people to be able to make up as many as they want? You would need to update the sql query near the top also the $id mysql select looks like it …

Member Avatar for Biiim
0
758
Member Avatar for AirmanTheGreat

>Should this work? yes, your `<head>` tag doesn't open though Also depending on your php server, some are set to supress notices by default so you can actually just do this: <html> <head> <meta charset='UTF-8'> <title>Comment</title> </head> <body> <?php echo $_POST['content']; ?> <h3>Post Comment</h3> <form method="POST"> <textarea name ="content" rows="3" …

Member Avatar for AirmanTheGreat
0
135
Member Avatar for cr7489

mysql is very good at that, is there a way you can get mysql to do it? eg. SELECT count(*) as `positive` FROM `reviews` LEFT JOIN `positive` ON 1 = 1 WHERE `review` LIKE CONCAT('%','not','%',`word`,'%'); SELECT count(*) as `negative` FROM `reviews` LEFT JOIN `negative` ON 1 = 1 WHERE `review` …

Member Avatar for cr7489
0
182
Member Avatar for jpadgett230

nicely described, the result returned by a mysql_fetch_assoc is actually an array so you should be more familiar with them than you think <?php while ($rows = mysql_fetch_assoc($query)){ //loop through each row in the mysql result set //foreach($array as $key=>$value) foreach($rows as $column_name => $column_value){ //loop through each column in …

Member Avatar for jpadgett230
1
221
Member Avatar for eltonpiko

user table users user_id, name etc calendar entry table entries entry_id,user_id,startdate,starttime,enddate,endtime,comment entry_id is a unique identifier for EVERY entry ever created on the calendar, dragging an entry uses it to identify that entry has moved and updates it accordingly. Then per user do a mysql select using their unique user_id …

Member Avatar for Biiim
0
188
Member Avatar for ask,dziner

> here is no code i m planning to make like this one div have some value so then the div 2 css will change if div1 have some value You can use javascript to do things like that, you can either define 2 css classes or just set an …

Member Avatar for Biiim
0
190
Member Avatar for antonioazevedo

just did this quickly with strpos, will this work for you? $string = 'This is some text <a href="url">and this is a link</a> and more text'; $cut_string = substr($string,0,strpos($string,'</a>')+4); echo "$string -> $cut_string <br/>\r\n";

Member Avatar for diafol
0
2K
Member Avatar for jemz

how i standardly do logins is like this: <?php if(ISSET($_POST['login'])){ $txtusername = $_POST['txtusername']; $txtusername = str_replace("'",'',$txtusername); $txtusername = str_replace('"','',$txtusername); $txtpassword = $_POST['txtpassword']; $txtpassword = str_replace("'",'',$txtpassword); $txtpassword = str_replace('"','',$txtpassword); $sql = "SELECT `user_id` FROM cookie_tbl where name = '$txtusername' and password = '$txtpassword'"; $result= mysql_query($sql); if($result !== false && mysql_num_rows($result)>0){ $userdata …

Member Avatar for jemz
0
140
Member Avatar for ashiiiish

missing a comma $query="insert into posts (pid,ptitle,pcont,uname,email) values('$pid','$ptitle','$pcont','$uname''$email')"; should be $query="insert into posts (pid,ptitle,pcont,uname,email) values('$pid','$ptitle','$pcont','$uname','$email')";

Member Avatar for Biiim
0
91
Member Avatar for brainfo

It's picking this up in style_nevio.css line 420 .nivo-caption a { color: #EFE9D1; text-decoration: underline; }

Member Avatar for brainfo
0
71
Member Avatar for eburlea

The problem i see is here `$id".$x." = $_POST['id".$x."'];` you can't concat a string onto a variable name, you should use an array for that eg. <?php $ids = array(); for ($x=1; $x<=3; $x++){ if (isset($_POST['id'.$x])) { $ids[] = $_POST['id'.$x]; } } var_dump($ids); ?> When you concat you need to …

Member Avatar for pritaeas
0
100
Member Avatar for Behseini

![accepted](http://4.bp.blogspot.com/-ZQWwhZjkJeo/T0ifPGGzPtI/AAAAAAAAE7c/UChhc6Aq6Hk/s400/challenge-accepted.jpg) stupid not showing an image, i'll write it for you

Member Avatar for Biiim
0
143
Member Avatar for Mariel Pineda

just checking but these should all be $_GET? $getcode= $_GET['code']; $gettitle=$GET_['title']; $getprice=$GET_['price']; $getstock=$GET_['stock']; When you use `<input type=text name=code[]>` on an input it makes the variable an array, if you are just passing 1 value don't bother just do this: <tr><td><input type=text name=code>Code</tr></td> <tr><td><input type=text name=title>Title</tr></td> <tr><td><input type=number name=price>Price</tr></td> <tr><td><input …

Member Avatar for tutorials4web
0
116
Member Avatar for ak47carbon

move your $_POSt proccessing to the very top of the page then tell the page to redirect to itself after posting. <?php if(isset($_POST["c4"])){ $insert=mysql_query("INSERT INTO hero_topic_c(hero_topic_c_userid,hero_topic_c_t_id,hero_topic_c_cm)values('$_POST[c1]','$_POST[c2]','$_POST[c3]')"); if($insert){ header("Location: thesamepage.php"); echo ""; }else{ die ("an error"); } } ?> The reason the browser is asking is cause you have submitted post …

Member Avatar for Biiim
0
204
Member Avatar for mrcniceguy

add a $_GET var into the reload? window.location.href = 'http://example.com/dir/page?refresh=no'; then if `$_GET['refresh'] == 'no'` don't refresh

Member Avatar for mrcniceguy
0
2K
Member Avatar for Poonam Jadav

little hard to read & work out what variables and what is even happening. Since you say you're learning, you should make it a habbit to format your code so it is easy to read eg. indent every opening and move back in on every close. It makes it much …

Member Avatar for Biiim
0
106
Member Avatar for 3tplus

<script type='text/javascript'> function doSomething(){ window.location = 'http://www.google.co.uk/'; } </script> <?php echo '<a href="javascript:" onclick="doSomething();">Do Something</a>'; ?>

Member Avatar for Biiim
0
413
Member Avatar for ebanbury

> This is great thanks. > How about for a URL link that does not match the ID though. > > For example the only other page I would want to protect is the my 'edit_property.php' page. > > For example a user is in URL: /editprop/RecordID=15 > > How …

Member Avatar for Biiim
0
4K
Member Avatar for ebanbury

You can only run a php function whilst the page is being generated - it is a server side script. You need a javascript function to do something once the page has loaded and the user starts interacting. AJAX that Pritaeas mentioned is a way to get javascript to open …

Member Avatar for Biiim
0
67
Member Avatar for Clarkeez

could use strlen and strpos to do that: <?php echo "strlen(\$_SERVER['HTTP_HOST']): ".strlen($_SERVER['HTTP_HOST'])."<br/>\r\n"; echo "strlen(\$_SERVER['HTTP_HOST']): ".strlen($_SERVER['HTTP_HOST'])."<br/>\r\n"; echo "strpos(\$_SERVER['HTTP_HOST'],'.domain.com'): ".strpos($_SERVER['HTTP_HOST'],'.domain.com')."<br/>\r\n"; echo "strlen(strpos(\$_SERVER['HTTP_HOST'],'.domain.com')): ".strlen('.domain.com')."<br/>\r\n"; if(strlen($_SERVER['HTTP_HOST']) == (strpos($_SERVER['HTTP_HOST'],'.domain.com') + strlen('.domain.com'))){ echo "String ends: .domain.com<br/>\r\n"; } ?> strpos might need +1 or -1 , it might miss a character off the count. Basically the first …

Member Avatar for Biiim
0
370
Member Avatar for abhi10kumar

> Error Returned: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Sharing Basis' )' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server …

Member Avatar for abhi10kumar
0
180
Member Avatar for shlokka

need to know what $comments->result() returns and what $whatsmyname->result() returns im guessing there shouldnt be 2 foreach loops it should be more like: <?php function getUserNames(){ $array = array(1=>'Bim',2=>'Bob',3=>'Schlokka',4=>'Elbeato'); return $array; } $names = getUserNames(); foreach($comments->result() as $com){ echo '<p>'.$names[$com->username_id].' commented on '.$com->bid_time.'</p><p>'.$com->bid_desc.'</p><br/>'; } ?> From the sound of it …

Member Avatar for diafol
0
127
Member Avatar for danielsikes

Not sure if it's possible/works but i wonder if you can make the child directory a shortcut to the parent? parentfolder/file1.pdf childfolder/file1.pdf -> parentfolder/file1.pdf or is this backup related? Another idea could be to get a program that will sync 2 folders so they match, a quick google search brought …

Member Avatar for pritaeas
0
245
Member Avatar for clarme

I went to your site(the domain the images are hosted on) and just added a `<br/>` before the text and it displayed correctly: <br/>2012 Emergency Network of Los Angeles

Member Avatar for Biiim
0
179
Member Avatar for cascer1

Ages since i looked at paypal, heres the landing page after the payment was completed: <?php // read the post from PayPal system and add 'cmd' if(ctype_alnum($_GET['tx'])){ $tx = $_GET['tx']; }else{ $tx = ''; } $req = 'cmd=_notify-synch'; $tx_token = $tx; $auth_token = "YOURAUTHTOKEN"; $req .= "&tx=$tx_token&at=$auth_token"; // post back …

Member Avatar for Biiim
0
185
Member Avatar for J.Killa

It will be printing out a default value of "mypassword" or your browser has a autofill saved for that page with mypassword in it

Member Avatar for codemonkey88
0
105
Member Avatar for programmer12

Heres how i would do it: echo date("Y-m-d H:i:s"); echo "<br/><br/>"; echo date("Y-m-d H:i:s",strtotime("-15 minutes",strtotime(date("Y-m-d H:i:s")))); You should also watch if your mysql time going out of sync of your server time could be an issue, i hit a similar problem recently where the mysql was 3 hours out of …

Member Avatar for programmer12
0
170
Member Avatar for theNORTH

If you're sure $data['introhtml'] is the right place to put it. $data['introhtml'] = '<div id="calendar"></div>'; $content->introhtml = isset($data['introhtml']) ? $data['introhtml'] : array();

Member Avatar for theNORTH
0
166
Member Avatar for richprich

[QUOTE=bloodbender;1781757]Ouch, your links have commas and line breaks? That's rough buddy. Regardless, commas should work since you're using the explode function on a space. Did you isolate the url BEFORE running the comment through strip tags?[/QUOTE] I think he means the person posting the comment puts a comma right after …

Member Avatar for richprich
0
356
Member Avatar for LastMitch

i should mention ive not changed anything i just put it in code tags [CODE]<?php session_start(); header("Cache-control: private"); require_once ('include/init.php'); if (isset($_POST['ins'])) { if (!isset($_POST['promo'])) {$promo="no";} else {$promo="yes";} $sstat = $_POST["stat"]; $sql="INSERT INTO cust(fname, lname, email, addr, city, stat, zip, promo, phone, dt, country) VALUES (". "'".mysql_real_escape_string(trim($_POST["fname"]))."', ". "'".mysql_real_escape_string(trim($_POST["lname"]))."', ". …

Member Avatar for LastMitch
2
200
Member Avatar for Argyrisv

[CODE] for ($i = 0; $i < count_req($getuser[0]['email']); $i++){ echo "<form method='post'> <input type='hidden' name='id' value='{$i}'/> <input type='submit' name='action' value='Accept'/> <input type='submit' name='action' value='Reject'/> <br/> </form>"; } [/CODE] [CODE] if(ISSET($_POST['id']) && ctype_digit($_POST['id']) && ISSET($_POST['action'])){ $id = $_POST['id']; $action = $_POST['action']; if($action == 'Accept'){ //Do whatever accept does with $id }elseif($action …

Member Avatar for Biiim
0
2K
Member Avatar for mgd00tz

change: [CODE] $receiptNumber = ($_POST['receiptNumber']); $paymentDate = mysql_real_escape_string(htmlspecialchars($_POST['paymentDate'])); $ammount = mysql_real_escape_string(htmlspecialchars($_POST['ammount'])); $ammountPaid = mysql_real_escape_string(htmlspecialchars($_POST['ammountPaid'])); $studentId = mysql_real_escape_string(htmlspecialchars($_POST['studentId']));[/CODE] to: [CODE] if(isset($_POST['receiptNumber'])){ $receiptNumber = ($_POST['receiptNumber']); }else{ $receiptNumber = ''; } if(isset($_POST['paymentDate'])){ $paymentDate = mysql_real_escape_string(htmlspecialchars($_POST['paymentDate'])); }else{ $paymentDate = ''; } if(isset($_POST['ammount'])){ $ammount = mysql_real_escape_string(htmlspecialchars($_POST['ammount'])); }else{ $ammount = ''; } if(isset($_POST['ammountPaid'])){ $ammountPaid = mysql_real_escape_string(htmlspecialchars($_POST['ammountPaid'])); …

Member Avatar for cyverge
0
223
Member Avatar for Casperjames
Member Avatar for laura301019

[QUOTE=laura301019;1782022]No this is just one of the many files i have, there's quite alot of code so didn't want to post it all. Not looking for someone to tell me the answers was just wanting some to explain how i add a row to a database table and how to …

Member Avatar for Biiim
0
113
Member Avatar for akasekaihime

Your search page: [CODE=php]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Partas Bus</title> <style type="text/css"> body { background-color: #CEF7F5; } </style> <link href="css/homelayout.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="logo"></div> <div id="navigation"><a href="home.php">Home</a> | <a href="reservation.php">Reservation</a> | <a href="contactus.php">Contact Us</a></div> …

Member Avatar for veedeoo
0
267
Member Avatar for laura301019

it depends which quotes your query is in, double quotes process variables and single quotes print them literally eg. assuming $name == 'Biiim' [CODE]echo 'INSERT INTO table_name VALUES ($name)'; //prints out:INSERT INTO table_name VALUES ($name) echo "INSERT INTO table_name VALUES ($name)"; //prints out:INSERT INTO table_name VALUES (Biiim) [/CODE] you can …

Member Avatar for Biiim
0
121
Member Avatar for titosd

something like this [CODE=mysql]CREATE USER 'testing'@'localhost' IDENTIFIED BY '1234';[/CODE] [CODE=mysql]GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE USER, CREATE VIEW, DELETE, DROP, EVENT, EXECUTE, FILE, INDEX, INSERT, LOCK TABLES, PROCESS, REFERENCES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SELECT, SHOW DATABASES, SHOW VIEW, SHUTDOWN, SUPER, TRIGGER, UPDATE ON *.* …

Member Avatar for Biiim
0
1K
Member Avatar for bavenbabu

output them into an array first before outputting them to the page, eg you must have something like this looping them out onto the page: [CODE=php] foreach($row as $v){ echo "<order><id>{$v['id']}</id><name>{$v['name']}</name><age>{$v['age']}</age></order>"; } [/CODE] change it to: [CODE] $xmldata = array(); foreach($row as $v){ $xmldata[$v['id']} = $v; } foreach($xmldata as $v){ …

Member Avatar for Biiim
-1
105

The End.