JustLikeIcarus
Members-
Posts
430 -
Joined
-
Last visited
Everything posted by JustLikeIcarus
-
Retrieve ID of previous insert and forward to url
JustLikeIcarus replied to shawndibble's topic in MySQL Help
Are the records being inserted successfully? -
Its a class like in css. Just give your element class="edit_link" or whatever. Take a look at the jquery website, you'll get the hang of it pretty quickly.
-
In this example you would give that class to whatever element you want to show/hide.
-
One way would be to use jquery and do something like this. $("fieldset").hover( function () { $(this).find(".edit_link").show(); }, function () { $(this).find(".edit_link").hide(); } );
-
$item_count = 0; while (list($key, $value) = each($items)) { if ($value) { $item_count++; } } for($i = 0; $i < $item_count; $i++) { // do things here. }
-
You were mixing around quote usagle which makes it that much more difficult. Heres it rewritten a little clearer hopefully. $newslist .= '<a href="news.php?view='.$selectmin.'&vmax='.$selectmax.'" style="font-weight:'.$fweight.'; ">'.$new_word.' ('.$newslisttotal.')</a>'; the '; was missing at the end.
-
Retrieve ID of previous insert and forward to url
JustLikeIcarus replied to shawndibble's topic in MySQL Help
Move the header call to the end of the if statement. <div class="content"> <?php if(isset($_POST['add'])) { include 'config.php'; include 'opendb.php'; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $business = $_POST['business']; $phone = $_POST['phone']; $email = $_POST['email']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $country = $_POST['country']; $step = $_POST['step']; $comments = $_POST['comments']; $query = "INSERT INTO clients (firstname, lastname, business, phone, email, address, city, state, zip, country, step, comments) VALUES ('$firstname', '$lastname', '$business', '$phone', '$email', '$address', '$city', '$state', '$zip', '$country', '0', '$comments')"; mysql_query($query); $sID = mysql_insert_id(); include 'closedb.php'; header("Location: http://www.newsalesparadigm.com/ex-sample/pretest.php?id=$sID"); } ?> <form method="post"> <table cellpadding="0" cellspacing="0"> <tr> <td><input name="firstname" type="text" id="firstname" value="First Name" size="13" /> <input name="lastname" type="text" id="lastname" value="Last Name" size="13" /></td> <td><a href="clientlist.php" style="padding-left:0px;">Return to client list</a></td> </tr> </table> <input name="business" type="text" id="business" value="Business Name" size="30" /> <input name="phone" type="text" id="phone" value="Phone Number" size="30" /> <input name="email" type="text" id="email" value="Email Address" size="30" /> <input name="address" type="text" id="address" value="Address" size="30" /> <input name="city" type="text" id="city" value="City" size="20" /> <input name="state" type="text" id="state" value="State" size="3" /> <input name="zip" type="text" id="zip" value="Zip" size="12" /> <input name="country" type="text" id="country" value="Country" size="11" /> <textarea name="comments" id="comments" size="30" rows="4" wrap="virtual">Comments</textarea> <br /> <input name="add" id="add" type="submit" value="SAVE" /> -
Dang the182guy got it first.
-
If its a missing semicolon then its most likely before the line that is stated in the error. Could you post all of the code please?
-
Oh sorry, here SELECT t1.gamename FROM ( SELECT gamename, count(gamename) as theCount FROM highscores GROUP BY gamename ) t1 ORDER BY t1.theCount DESC
-
Only return records by their alphabetical range
JustLikeIcarus replied to refiking's topic in MySQL Help
Same as the one above just modified so that case isn't an issue. select stores_title, stores_id from stores WHERE lower(stores_title) REGEXP '^[a-m]' ORDER BY stores_title -
Running a SELECT query inside foreach loop
JustLikeIcarus replied to aliks0905's topic in MySQL Help
What do you get if you just run this? $filename = "datelist/aprildates.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd,filesize ($filename)); fclose ($fd); $delimiter = ";"; $splitcontents = explode($delimiter, $contents); foreach ( $splitcontents as $date ) { echo $date . "</br>"; } -
So you want to display each distinct gamename ordered by the number of times that gamename exists? Is that right? Try this: SELECT gamename FROM ( SELECT gamename, count(gamename) as theCount FROM highscores GROUP BY gamename ) ORDER BY theCount DESC
-
You would want to make use of document.location.hash like... if (document.location.hash=='#comments'){ //Show the hidden comments }
-
It looks like your problem is a result from trying to access information from another domain than the one where your script resides. Explained here: If you want to do this you will need a php proxy script on your server that fetches data from the other domain.
-
First try logging out deleting your cookies and logging back in. That may work if everything was working and suddenly stopped.
-
try rewritting it like this. function loggin_check($user) { if ($user['is_guest']) { header('Location:http://www.netgamegurus.com/index.php'); } } Then call like this. loggin_check($context['user']);
-
Ok I messed around in Excel and came up with this formula which worked fine for me. =(A1-25569)*86400
-
Looks like its due to you having a border defined for the img inside of the link but nothing set for the link itself to its getting the default border. Try adding this to the css. a { border-style:none; }
-
If you need an excel formula I found this. =(((E2-(6*3600))/86400)+25569) * E2 = cell reference * 6 = Timezone Offset (this is Central Standard time) * 3600 = Number of seconds in an hour * 86400 = Number of seconds in a year * 25569 = Excel hack because excel counts epoch from 1/1/1900 and most others start at 1/1/1970.
-
Ok I got this working fine for me. It wont give you the filename you want but that is easy to pull from the url. $file = 'http://middlezonemusings.com/wp-content/uploads/2007/03/eiffel-tower.jpg'; header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header('Content-type: image/jpeg'); header("Content-Transfer-Encoding: binary"); readfile($file);
-
This is whats known as a browsers "box model". Take a look at this explaination http://www.456bereastreet.com/archive/200612/internet_explorer_and_the_css_box_model/
-
How about this? header('Content-type: image/jpeg'); header('Content-Disposition: attachment; filename="image.jpg"'); $content = file_get_contents('http://middlezonemusings.com/wp-content/uploads/2007/03/eiffel-tower.jpg'); echo $content;
-
Count number or files in a directory script
JustLikeIcarus replied to adamriley's topic in PHP Coding Help
Works fine for me. I would suggest checking that the directory exists and the script can access it. Remember that path will start from system root "/" not document root. -
In the .click section of your function try changing it to .click(function() { // close if already visible if (input.autocomplete("widget").is(":visible")) { input.autocomplete("close"); return false; } // pass empty string as value to search for, displaying all results input.autocomplete("search", ""); input.focus(); return false; });