-
Posts
471 -
Joined
-
Last visited
-
Days Won
8
Posts posted by dalecosp
-
-
That's the template, as requinix says. The template should even tell you what file to edit in order to change it. Of course, the idea is that you'll be writing some commentary about what the file does in that space...
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
?>
-
1. Create a system that scours some given subset of the 'Net for something (real estate, cars, wines, single women , vitamins, weapons, DVD's, $whatever), categorizes them, and uploads them to (Pinterest | Ebay | Etsy | $someplace).
2. Create a system that converts vBulletin forums to IPBB or phpBB or ub.threads or $someforum ...
-
You might do it via Javascript after page load. Obviously, it can be done from PHP as well; you'd have to know something about WordPress internals (and, obviously, PHP).
I don't know much about WordPress, though ... seems like I had an installation once, but I don't remember playing around with it ... -
At the risk of alienating a cousin of mine who's something of a bigwig at the above-named registrar/hosting service, I'd leave them and go to RootBSD.net without hesitation. Their name says it all
Our business moved 3 sites there last year and I don't think we could be happier. -
Welcome, and best of luck!
I'm fairly happy with MySQL. I've always wanted to try PostGreSQL though ... maybe someday. It's tough to push yourself in new directions ... kudos to you for trying!
-
Hello
I have the data in the database for a client appear in the fields of input type = text ... Is it possible modification or replacement of the data within the fields to anything I want to do by the submit button replaces the data that I have typed the previous allowance in the database table? And how?
I want exactly similar way when the edit data in phpmyadmin.
like this :
This review of the data code ... I want to make the update button on this page.
$name = addslashes($_POST['dname']); $con=mysqli_connect("localhost","root","","ahmedark_depot"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM driver_info WHERE driver_name ='$name'"); while($row = mysqli_fetch_array($result)) { echo "drivername: <input type=\"text\" name=\"id\" value = \"$row[id]\"><br /><br />" ; echo "drivername: <input type=\"text\" name=\"driver_name\" value = \"$row[driver_name]\"><br /><br />" ; echo "prevent: <input type=\"text\" name = \"prevent\" value = \"$row[prevent]\"><br /><br />" ; echo "note prev: <input type=\"text\" name = \"note_prev\" value = \"$row[note_prev]\"><br /><br />" ; echo "note : <input type=\"text\" name = \"general_note\" value = \"$row[general_note]\"><br /><br />" ; } mysqli_close($con); ?>
If I'm understanding correctly, you want to make your output into an HTML form which can be submitted and make changes in the data. If you cannot use PHPMyAdmin to do this (I'm presuming because you do not wish for WWW users to have access to PHPMyAdmin ), then you'll first need to modify your output to have "<form>" tags (which may have already been done, you do seem to have <input> tags), and then write a handler for the POSTed data.
For a basic button, you need this:
<input type='submit'>
You must make sure the form has a "method" attribute of "post" and an action attribute that points to your handler script:<form method="post" action="myhandler.php">
You can see what is in the post array like this:print_r($_POST);
-
link tramadol hcl effects - buy ultram online no prescription
Moderator, please axe this blasted spammer, plx!
-
Does
overflow:scroll;
in the CSS/style work for you? -
What does Firebug say?
If the error's in Javascript it should be throwing exceptions automagically... -
Yep, I've done that too, but that seems more of a hack to me. Besides, making the resource file a .php (or other dynamically processed file) provides a great deal more flexibility. For example, with my previous problem above, the array of options could be dynamically generated from a DB query. So, there would be no need to create a new flat-file and put it out on the server - just create a new DB entry.
True enough, but what's the point of serving anything from cache if not to negate the need for dynamic processing?
In any event, there is no single correct solution. There are always different factors that make one solution preferable to others.
True dat!
-
I'm not sure if you've given quite enough information to do *much* helping.
A "unit" will be an object, then? Sounds good. And you could have a generic "Unit" class and have subclasses for inch, centimeter, yard, pound, kilogram, etc.
What methods would they have? Would each have a "to_other" ("to_inch", "to_yard", "to_kilogram", etc.)?
As for method="PHP_SELF" ... that's simply using the same script as both the initial form and the data handler:
if (!$_POST) { show_the_form(); } else { //handler code goes here }
HTH, -
The browser was caching the file so changes were not being reflected for users who had previously accessed the page.
$.02, just for the sake of the future reader: we do lots of caching here.
Our SOP is to always update the HTML by adding a querystring to resources that are cached whenever the cached item is changed.
That is, if we make changes to "general.js", the corresponding script tag in the HTML will now look like this:
<script src="/js/general.js?datecode" />
This will cause the browser to see the file as a different resource, so it won't be cached. (Better than trying to "fake out" the server/browser by changing file names to imply other types). -
<title><?php echo str_replace("- Docwiki",'',$this->text('pagetitle')); ?></title>
? -
Does this help you?
<div class="video"> <html><center> <?php $meta_value = get_post_meta($post->ID, 'video_url', true); if($meta_value){ $url = parse_url($meta_value); $id = 0; if($url['host'] == 'youtu.be'){ $id = ltrim($url['path'],'/'); } else if(strpos($url['path'],'embed') == 1){ $id = end(explode('/',$url['path'])); } } else { parse_str($url['query']); $id = $v; } $video_info = simplexml_load_file(‘http://gdata.youtube.com/feeds/api/videos/’.$id.’?v=1'); echo '<h3>'.$video_info->content.'</h3><hr /><p><iframe width="540" height="355" frameborder="1" allowfullscreen="true" src="http://www.youtube.com/embed/'.$id. '?version=3&theme=light&fs=1&rel=0&cc_load_policy=1&iv_load_policy=1&modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="600" height="355"> </iframe></p><p>'.$video_info->content;.'</p>'; ?> </div>
NB: *Not* linted.... -
"Syntax error, unexpected > in line $somewhere" ...
Try this?foreach ($options as $option): ?> <option value=<?php echo $option['id'].">".$option['list_value'] ?></option> <?php endforeach ?>
-
-
"size" might not be the best choice of names for this variable, as several objects in JS have this as one of their methods. How about this?
function setSize() { if (document.getElementById('mySize').value >0) { var theSize= document.getElementByID('mySize').value; document.getElementById('btnAddToCart').options.onClick = "window.location.href='<?php echo $cart_url; ?>&s="+theSize+'"; } else { document.getElementById('btnAddToCart').options.onClick = "window.location.href='<?php echo $cart_url; ?>';"; } }
Does that work? (You will need to change your HTML, of course, as well....)
-
It works fine here ... if I want to see an array in place of the tag. Are you sure you don't want to use preg_replace() instead?
-
Hi
Im still learning and no I haven't.
How would I do that ?
I know it works in a normal php file but I was wondering if its the " around the onfocus as the other items can have ' instead
Thanks
Use Chrome, or install the Firebug extension in your Firefox browser. Then read this.
-
Are you trying to debug the onfocus() in the Javascript?
Have you tried Firebug or Chrome debugger? -
Write something in Perl or ASP and try and run it. </rimshot>
But, seriously, that might work. A deliberate syntax error in a *.pl file in your cgi-bin directory would probably trigger a 500.
-
I take it that it was *really* slow?
Most people think of email as "instantaneous" ... but it's not guaranteed to be and wasn't really designed that way. Close, maybe, in a perfect world, but not instant... -
When arrays are created without assigned indexes, they are indexed by numbers, starting with zero.
As all your arrays appear to meet this criterion, you should be able to do something like this:$ct = 0; // initialize a counter foreach($_POST['song'] as $item1){ echo "Song: $item1 <br />Link 1 ".$_POST['link1'][$ct]."<br />Link 2 ".$_POST['link2'][$ct]."<br />Link 3 ".$_POST['link3'][$ct]."<br />"; $ct++; }
Obviously, you're probably not planning to just print out the data, but hopefully you get the idea? -
Add a counter?
Preselecting checkboxes based on values in database...
in PHP Coding Help
Posted · Edited by dalecosp
HTH,