|
So, as many people have stated before, I'm really new to php and programming as a whole. But, I'm trying to start with the easy stuff when it comes to making small tweaks to my site. I want to change some text (a few words at the most) that is on the site now but I can't find where it is. I've searched the files individually offline using a "find" function but I can't locate the text I'm looking for. Ideally, I would like to make the changes directly on myphpadmin. Any advice out there? Thanks.
|
|
|
|
|
if the text is stored in a database it is likely it is stored as "BLOB". Which means editing requires file uploads etc which can be a pain. What you need to do is find the file that calls the database for the particular piece of text. then you will know exactly what you are looking for in phpmyadmin and whether or not you can edit it easily. i suggest updating it through use of a csv/sql file import or better still code a page that will let you edit what's in the database. it was one of the first things I learnt how to do with PHP.
|
|
|
|
|
i copied some code off the net and when saving the file in kate i get this message: You are trying to save a python file as non ascii, without specifying a correct source encoding line for encoding utf-8. Say what? Like i'm new to linux but i'm not new to computers and i have no idea what this means. options are insert coding or save nevertheless. The problem is i can;t alter the code the compiler says syntax error every time. Is that why? the utf-8 encoding?
|
|
|
|
|
The file you are trying to save contains non-ASCII data.
Call it "binary" data if it's clearer.
That's why Kate asks you about the encoding and the compiler fails.
You should hunt the non-ASCII data down and remove it, then you'll be ok.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Happens with " all the time, because most word-processors feel they need to change those...
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
Owww nasty word procs hehe!
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
I thought Kate was a well behaved plaintext editor? Meh, I've used Komodo Edit which can handle such odd things as Shift-JIS if I want it to...
----
Morgan Gangwere
Lead programmer, Unknown Software
"Pinky, are you thinking what im thinking?"
"I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?"
"You want me to calculate that? or should we take over the world?"
"ooh! OooooOOOooH! lets find out!"
|
|
|
|
|
How Can I Make Array Of String Move V. Or H.?
Just Like The Sub-news In TV
|
|
|
|
|
For a web application, you want that to happen on the client side, hence not driven by PHP, which is a server side language. Consider using JavaScript. Go to a web page that does it, and look at its source.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Some common js code
<script>
var marqueeWidth='950';
var marqueeHeight='18px';
var pauseMarquee=true;
var fontFamily = 'arial,sans-serif';
var marqueeSpeed=1;
var speedTwo=marqueeSpeed;
var textSpan, marquee;
var fontSize = parseInt(marqueeHeight) - 6;
function marquee(){
var content = document.getElementById('scroller').getAttribute('content');
if (document.getElementById){
var scrollit = '<div style="position:relative; margin:auto; width:'+marqueeWidth+'px;height:'+marqueeHeight+';overflow:hidden;color:#FFFFFF;"';
if (pauseMarquee) scrollit += ' onmouseover="speedTwo=0" onmouseout="speedTwo=marqueeSpeed"';
scrollit +='><div id="marquee" style="position:absolute;left:0px;top:0px;font-family:'+fontFamily+';font-size:'+fontSize+'px;white-space:nowrap;"><\/div><\/div>';
document.getElementById('scroller').innerHTML = scrollit;
marquee = document.getElementById("marquee");
marquee.style.left=(parseInt(marqueeWidth))+"px";
marquee.innerHTML='<span id="text">'+content+'<\/span>';
textSpan = document.getElementById("text").offsetWidth;
setInterval("scrollscroller()",17);
}
}
function scrollscroller(){
marquee.style.left = (parseInt(marquee.style.left)>(-10 - textSpan)) ?parseInt(marquee.style.left)-speedTwo+"px" : parseInt(marqueeWidth)+4+"px";
}
window.onload=marquee;
</script>
use with:
<div id="scroller" content="scrollling text"></div>
|
|
|
|
|
Hey dudes. I have got a problem. I was working on a simple student_course registeration for a week and @ last I lost it by some virus called "dulla" .... i cant recover it. the day after twommorrow is the final day.I also had other projects to submit to my cusotmers. So please if any body can give me a code or a resource . I know it is too lazy to do like this . but this one is my last and best choice
Thank you.
|
|
|
|
|
|
i am a under grad. student.
i have just started working on unix.
i want to know that what all projects can be made in unix
simple n feasible
please reply if anyone has any suggestions
|
|
|
|
|
Well what do you mean?
You can make any project with UNIX/Linux just like you can with any other operating system
If everything was not true, would it be not true that everything is not true? So by saying everything is not true, you are automatically denying that everything is not true. Im so confused...
FreeDOS
- An open source modern
MS-DOS/PC-DOS replacement.
|
|
|
|
|
I need help with how i can insert values from a checkbox and dropdown menu into mysql database and also display these values on a page using php.
here is what i have
<form action="view.php" method="post" enctype="multipart/form-data">
<table width="421" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><div align="center"><strong>Student BioData</strong></div></td>
</tr>
<tr>
<td width="82">Name</td>
<td width="215"><input name="name" type="text" id="name" size="40" /></td>
</tr>
<tr>
<td>Class</td>
<td><select name="class" id="class">
<option selected="selected"></option>
<option value="class">jss1</option>
<option value="class">jss2</option>
<option value="class">jss3</option>
</select>
</td>
</tr>
<tr>
<td>Age</td>
<td><input type="text" name="age" id="age" /></td>
</tr>
<tr>
<td>ClassTeacher</td>
<td><input type="text" name="teacher" id="teacher" /></td>
</tr>
<tr>
<td>Checked Values</td>
<td>Tall
<input type="checkbox" name="checked[]" id="tall" />
Short
<input type="checkbox" name="checked[]" id="short" />
Fat
<input type="checkbox" name="checked[]" id="fat" />
Thin
<input type="checkbox" name="checked[]" id="thin" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<p>
<table width="220" height="138" border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" valign="top"> </td>
</tr>
</table>
<p>
|
|
|
|
|
There are several tutorials available to help you with this. Here is one.[^]. More Tutorials.[^]
Broken down into sections; you should read this[^] and this[^] with regards to the POST variables. Then have a read of this[^] tutorial for inserting into a MySql database.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
hhtp://abc.com/12?ud=504132
..........<? echo $_GET['ud'] ?>........;
I want to do like this
$us=<? echo $_GET['ud'] ?>;
if($us==504132)
{
$us='Hi';
}else
{
$us='Bye';
}
$echo 'I want to say you:'<? echo $_GET['us'] ?>;
But it is not working what to do now ?
<code></code><pre></pre>
|
|
|
|
|
udch wrote: $us=<? echo $_GET['ud'] ?>;
Why are you opening new PHP tags when you are already in some? <? $us = <? ... It's just not necessary.
Check if ud is set, otherwise it is 0 .
$us = isset($_GET['ud']) ? $_GET['ud'] : 0 ;
udch wrote: $echo 'I want to say you:'<? echo $_GET['us'] ?>;
$echo is just wrong; echo is not a variable but a language construct. Read the documentation[^] to learn more. And again with the opening of more PHP tags.
echo '$ud = ' . $us;
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
I am getting value from an url Like http://abc.com/data.php?ud=567878 Now i am passing this value to an iframe of HTML exmple:-
<Body>
<Html>
<iframe frameborder=0 src="http://www.es.com/ifr?url=http://anc.com/wow.xml&amp;up_k1=<? echo $_GET['ud'] ?>&up_interval=60&amp;synd=open&amp;w=362&amp;h=350&amp;" width=284 height=120 scrolling="no"></iframe>
</Body>
</Html>
I have to write value like up_k1=567878 and it can not take value from any variable.
My problem is and i want to do is checking value like
if($ud==567878)
{
$ud='love all humans';
}
and then write it in iframe like
up_k1=love all humans
Now tell me brother can i do this ?
|
|
|
|
|
Please engage your brain.
<? echo $ud ?> instead of <? echo $_GET['ud'] ?>
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thank you very much for all your help code is working good now.Thanks again my brother.
|
|
|
|
|
I'm just starting out with PHP development and would like to know what the best IDE is for windows is. I'm currently used to working in visual studio.
|
|
|
|
|
Personally I use Notepad++[^] although I have used PHPEclipse[^] on occasion. I've heard good things about Aptana[^]. If you want to spend money then you can use Dreamweaver, but it's not the best environment.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks, I'll try Notepad++ I also have Dreamweaver and will try that too.
|
|
|
|
|